-
public interface ItemTouchHelperAdapterInterface to listen for a move or dismissal event from a ItemTouchHelper.Callback.
-
-
Method Summary
Modifier and Type Method Description abstract booleanonItemMove(int fromPosition, int toPosition)Called when an item has been dragged far enough to trigger a move. abstract voidonItemDismiss(int position)Called when an item has been dismissed by a swipe. -
-
Method Detail
-
onItemMove
abstract boolean onItemMove(int fromPosition, int toPosition)
Called when an item has been dragged far enough to trigger a move. This is called every timean item is shifted, and not at the end of a "drop" event.Implementations should call notifyItemMoved afteradjusting the underlying data to reflect this move.
- Parameters:
fromPosition- The start position of the moved item.toPosition- Then resolved position of the moved item.
-
onItemDismiss
abstract void onItemDismiss(int position)
Called when an item has been dismissed by a swipe.Implementations should call notifyItemRemoved afteradjusting the underlying data to reflect this removal.
- Parameters:
position- The position of the item dismissed.
-
-
-
-