Interface DynamicTouchAdapter


public interface DynamicTouchAdapter
Interface to listen movement of an item inside the recycler view adapter.

Implement this interface in the adapter class to receive item movement callbacks.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onItemDismiss(int position)
    This method will be called when item is dismissed or removed from a particular position.
    boolean
    onItemMove(int fromPosition, int toPosition)
    This method will be called when item starts moving from one position to other.
  • Method Details

    • onItemMove

      boolean onItemMove(int fromPosition, int toPosition)
      This method will be called when item starts moving from one position to other.
      Parameters:
      fromPosition - The current position of the item.
      toPosition - The new position of the item.
      Returns:
      true if item starts moving.
    • onItemDismiss

      void onItemDismiss(int position)
      This method will be called when item is dismissed or removed from a particular position.
      Parameters:
      position - The position of the dismissed item.