how to change state from sent to read when click item !
update
this is my fragment
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
ODataRow row = OCursorUtils.toDatarow((Cursor) mAdapter.getItem(position));
Sanction sanction = new Sanction(context, null);
OValues values = new OValues();
values.put("state", "read");
sanction.update(row.getInt(OColumn.ROW_ID), values);
my model
public class Sanction extends OModel {
OColumn state = new OColumn("State", OSelection.class)
.addSelection("draft","Draft")
.addSelection("confirm","Confirmed")
.addSelection("close","Canceled")
.addSelection("done","Done");
}
I need to update state of sales when I click in item list view but i can't
how to change state from sent to read when click item ! update
this is my fragment public void onItemClick(AdapterView<?> parent, View view, int position, long id) { ODataRow row = OCursorUtils.toDatarow((Cursor) mAdapter.getItem(position));
Sanction sanction = new Sanction(context, null);
OValues values = new OValues(); values.put("state", "read"); sanction.update(row.getInt(OColumn.ROW_ID), values); my model public class Sanction extends OModel {
OColumn state = new OColumn("State", OSelection.class) .addSelection("draft","Draft") .addSelection("confirm","Confirmed") .addSelection("close","Canceled") .addSelection("done","Done"); }
I need to update state of sales when I click in item list view but i can't