Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2014
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. private void refreshItemsFromTable() {
  2.  
  3.         // Pobranie wszystkich zadań nie oznaczonych flagą 'completed'
  4.         // i dodanie ich do adaptera listy.
  5.         mToDoTable.where().field("complete").eq(val(false)).execute(new TableQueryCallback<ToDoItem>() {
  6.  
  7.             public void onCompleted(List<ToDoItem> result, int count, Exception exception, ServiceFilterResponse response) {
  8.                 if (exception == null) {
  9.                     mAdapter.clear();
  10.  
  11.                     for (ToDoItem item : result) {
  12.                         mAdapter.add(item);
  13.                     }
  14.  
  15.                 } else {
  16.                     createAndShowDialog(exception, "Error");
  17.                 }
  18.             }
  19.         });
  20.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement