public void toggleCompleted(int index) { ListEntry entry = DbHelper.getItem((Cursor) mAdapter.getItem(index)); mDbHelper.updateCompleted(entry.getId(), !entry.isCompleted()); requery(); }
public void swapElements(int indexOne, int indexTwo) { mDbHelper.swapElements( DbHelper.getItem((Cursor) mAdapter.getItem(indexOne)), DbHelper.getItem((Cursor) mAdapter.getItem(indexTwo))); requery(); }
private void requery() { mAdapter.changeCursor(mDbHelper.getEntriesCursor()); }