-
public interface ItemTouchHelperCallback.ViewHolderCallbackInternal Interface for ViewHolder to notify of relevant callbacks from Callback.This listener, is to intend as a further way to display How a ViewHolder will displaythe middle and final activation state.
Generally the final action should be handled by the listeners OnItemMoveListener and OnItemSwipeListener.
-
-
Method Summary
Modifier and Type Method Description abstract voidonActionStateChanged(int position, int actionState)Called when the ItemTouchHelper first registers an item as being moved or swiped. abstract voidonItemReleased(int position)Called when the ItemTouchHelper has completed the move or swipe, and the activeitem state should be cleared. abstract booleanisDraggable()abstract booleanisSwipeable()abstract ViewgetFrontView()On Swipe, override to return the Front View. abstract ViewgetRearLeftView()On Swipe, override to return the Rear Left View. abstract ViewgetRearRightView()On Swipe, override to return the Rear Right View. -
-
Method Detail
-
onActionStateChanged
abstract void onActionStateChanged(int position, int actionState)
Called when the ItemTouchHelper first registers an item as being moved or swiped.Implementations should update the item view to indicate it's active state.
FlexibleViewHolder class already provides an implementation to handle theactive state.
- Parameters:
position- the position of the item touchedactionState- one of ACTION_STATE_SWIPE orACTION_STATE_DRAG.
-
onItemReleased
abstract void onItemReleased(int position)
Called when the ItemTouchHelper has completed the move or swipe, and the activeitem state should be cleared.
FlexibleViewHolder class already provides an implementation to disable theactive state.
- Parameters:
position- the position of the item released
-
isDraggable
abstract boolean isDraggable()
-
isSwipeable
abstract boolean isSwipeable()
-
getFrontView
abstract View getFrontView()
On Swipe, override to return the Front View.
Default is itemView.
-
getRearLeftView
abstract View getRearLeftView()
On Swipe, override to return the Rear Left View.
Default is null (no view).
-
getRearRightView
abstract View getRearRightView()
On Swipe, override to return the Rear Right View.
Default is null (no view).
-
-
-
-