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