Package 

Interface ItemTouchHelperCallback.ViewHolderCallback

    • Method Summary

      Modifier and Type Method Description
      abstract void onActionStateChanged(int position, int actionState) Called when the ItemTouchHelper first registers an item as being moved or swiped.
      abstract void onItemReleased(int position) Called when the ItemTouchHelper has completed the move or swipe, and the activeitem state should be cleared.
      abstract boolean isDraggable()
      abstract boolean isSwipeable()
      abstract View getFrontView() On Swipe, override to return the Front View.
      abstract View getRearLeftView() On Swipe, override to return the Rear Left View.
      abstract View getRearRightView() On Swipe, override to return the Rear Right View.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 touched
        actionState - 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
      • 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).