Package 

Interface FlexibleAdapter.OnItemMoveListener

    • Method Summary

      Modifier and Type Method Description
      abstract boolean shouldMoveItem(int fromPosition, int toPosition) Called when the item would like to be swapped.
      abstract void onItemMove(int fromPosition, int toPosition) Called when an item has been dragged far enough to trigger a move.
      • Methods inherited from class eu.davidea.flexibleadapter.FlexibleAdapter.OnActionStateListener

        onActionStateChanged
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • shouldMoveItem

         abstract boolean shouldMoveItem(int fromPosition, int toPosition)

        Called when the item would like to be swapped.

        Delegate this permission to the user.

        Parameters:
        fromPosition - the potential start position of the dragged item
        toPosition - the potential resolved position of the swapped item
      • onItemMove

         abstract void onItemMove(int fromPosition, int toPosition)

        Called when an item has been dragged far enough to trigger a move. This is calledevery time an item is shifted, and not at the end of a "drop" event.

        The end of the "drop" event is instead handled by onItemReleased.

        Tip: Here, you should call invalidateItemDecorations to recalculateitem offset if any item decoration has been set.
        Parameters:
        fromPosition - the start position of the moved item
        toPosition - the resolved position of the moved item