コード例 #1
0
 // Remember to notify
 private void updateLazyList() {
   LazyList<DraftRaw> lazyList = DB.getDraftLazyList();
   if (mLazyList != null) {
     mLazyList.close();
   }
   mLazyList = lazyList;
 }
コード例 #2
0
 @Override
 public void onPerformAfterSwipeReaction(
     DraftHolder holder, int position, int result, int reaction) {
   if (reaction == RecyclerViewSwipeManager.AFTER_SWIPE_REACTION_REMOVE_ITEM) {
     DB.removeDraft(getItemId(position));
     updateLazyList();
     notifyItemRemoved(position);
     checkEmpty(true);
   }
 }