-
public interface OnItemSwipeListener<T extends Object>Listener for the swiping events of list items.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enumOnItemSwipeListener.SwipeDirectionIndicates the direction in which the swipe action is performed.
-
Method Summary
Modifier and Type Method Description abstract BooleanonItemSwiped(Integer position, OnItemSwipeListener.SwipeDirection direction, T item)Callback for whenever an item has been swiped. -
-
Method Detail
-
onItemSwiped
abstract Boolean onItemSwiped(Integer position, OnItemSwipeListener.SwipeDirection direction, T item)
Callback for whenever an item has been swiped. If it returns false, this event will be considered as not handled and the swiped item will be removed from the adapter's data set. This is the standard behaviour. If it returns true, this event will be considered as handled and the adapter's data set will not be changed. In this case, it is your responsibility to apply the necessary changes to the adapter's data set.
- Parameters:
position- The position of the swiped item.direction- The direction in which the item has been swiped.item- The item that has been swiped.
-
-
-
-