public static interface ItemTouchHelperCallback.ViewHolderCallback
Callback.
Generally the final action should be handled by the listeners
FlexibleAdapter.OnItemMoveListener and FlexibleAdapter.OnItemSwipeListener.
| Modifier and Type | Method and Description |
|---|---|
android.view.View |
getFrontView()
On Swipe, override to return the Front View.
|
android.view.View |
getRearLeftView()
On Swipe, override to return the Rear Left View.
|
android.view.View |
getRearRightView()
On Swipe, override to return the Rear Right View.
|
boolean |
isDraggable() |
boolean |
isSwipeable() |
void |
onActionStateChanged(int position,
int actionState)
Called when the
ItemTouchHelper first registers an item as being moved or swiped. |
void |
onItemReleased(int position)
Called when the
ItemTouchHelper has completed the move or swipe, and the active
item state should be cleared. |
void onActionStateChanged(int position,
int actionState)
ItemTouchHelper first registers an item as being moved or swiped.
FlexibleViewHolder class already provides an implementation to handle the
active state.
position - the position of the item touchedactionState - one of ItemTouchHelper#ACTION_STATE_SWIPE or
ItemTouchHelper#ACTION_STATE_DRAG.FlexibleViewHolder.onActionStateChanged(int, int)void onItemReleased(int position)
ItemTouchHelper has completed the move or swipe, and the active
item state should be cleared.
FlexibleViewHolder class already provides an implementation to disable the
active state.
position - the position of the item releasedboolean isDraggable()
boolean isSwipeable()
android.view.View getFrontView()
Default is itemView.
android.view.View getRearLeftView()
Default is null (no view).
android.view.View getRearRightView()
Default is null (no view).