I - Type of the item interactor that will be used by this helper.public abstract class RecyclerViewItemHelper<I extends RecyclerViewItemHelper.ItemInteractor> extends ItemTouchHelper
ItemTouchHelper implementation that is used as base class by all item helpers from the
Recycler library and is also encouraged to be used as base class by custom helper implementations.| Modifier and Type | Class and Description |
|---|---|
static interface |
RecyclerViewItemHelper.Direction
Defines an annotation for determining supported directions by
ItemTouchHelper API. |
static interface |
RecyclerViewItemHelper.Interaction
Defines an annotation for determining available interaction states for
ItemTouchHelper API. |
static interface |
RecyclerViewItemHelper.InteractiveViewHolder
Required interface for
ViewHolders with which may user interact
via a concrete RecyclerViewItemHelper implementation. |
static class |
RecyclerViewItemHelper.ItemInteractor
A
ItemTouchHelper.Callback implementation which should be used as base class for
all interactors used by RecyclerViewItemHelper implementations. |
static interface |
RecyclerViewItemHelper.Movement
Defines an annotation for determining supported movement flags by
ItemTouchHelper API. |
ItemTouchHelper.Callback, ItemTouchHelper.SimpleCallback, ItemTouchHelper.ViewDropHandlerACTION_STATE_DRAG, ACTION_STATE_IDLE, ACTION_STATE_SWIPE, ANIMATION_TYPE_DRAG, ANIMATION_TYPE_SWIPE_CANCEL, ANIMATION_TYPE_SWIPE_SUCCESS, DOWN, END, LEFT, RIGHT, START, UP| Modifier | Constructor and Description |
|---|---|
protected |
RecyclerViewItemHelper(I interactor)
Creates a new instance of RecyclerViewItemHelper with the specified interactor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
attachToRecyclerView(RecyclerView recyclerView) |
I |
getInteractor()
Returns the interactor instance used by this helper to support its specific feature for
items of the
RecyclerView to which is this helper instance attached. |
getItemOffsets, onChildViewAttachedToWindow, onChildViewDetachedFromWindow, onDraw, onDrawOver, startDrag, startSwipegetItemOffsets, onDraw, onDrawOver@NonNull public final I getInteractor()
RecyclerView to which is this helper instance attached.
The returned interactor may be used to configure the provided feature.
public void attachToRecyclerView(@Nullable RecyclerView recyclerView)
attachToRecyclerView in class ItemTouchHelper