public static interface FlexibleAdapter.OnItemMoveListener extends FlexibleAdapter.OnActionStateListener
| Modifier and Type | Method and Description |
|---|---|
void |
onItemMove(int fromPosition,
int toPosition)
Called when an item has been dragged far enough to trigger a move.
|
boolean |
shouldMoveItem(int fromPosition,
int toPosition)
Called when the item would like to be swapped.
|
onActionStateChangedboolean shouldMoveItem(int fromPosition,
int toPosition)
Delegate this permission to the user.
fromPosition - the potential start position of the dragged itemtoPosition - the potential resolved position of the swapped itemonItemMove() will be called),
false otherwise (nothing happens)FlexibleAdapter.onItemMove(int, int)void onItemMove(int fromPosition,
int toPosition)
The end of the "drop" event is instead handled by
FlexibleViewHolder.onItemReleased(int).
FlexibleAdapter.invalidateItemDecorations(long) to recalculate
item offset if any item decoration has been set.fromPosition - the start position of the moved itemtoPosition - the resolved position of the moved itemFlexibleAdapter.shouldMove(int, int)