public static interface

RecyclerViewDragDropManager.OnItemDragEventListener

com.h6ah4i.android.widget.advrecyclerview.draggable.RecyclerViewDragDropManager.OnItemDragEventListener

Class Overview

Used for listening item drag events

Summary

Public Methods
abstract void onItemDragFinished(int fromPosition, int toPosition, boolean result)
Callback method to be invoked when dragging is finished.
abstract void onItemDragMoveDistanceUpdated(int offsetX, int offsetY)
Callback method to be invoked when the distance of currently dragging item is updated.
abstract void onItemDragPositionChanged(int fromPosition, int toPosition)
Callback method to be invoked when item position is changed during drag.
abstract void onItemDragStarted(int position)
Callback method to be invoked when dragging is started.

Public Methods

public abstract void onItemDragFinished (int fromPosition, int toPosition, boolean result)

Callback method to be invoked when dragging is finished.

Parameters
fromPosition Previous position of the item.
toPosition New position of the item.
result Indicates whether the dragging operation was succeeded.

public abstract void onItemDragMoveDistanceUpdated (int offsetX, int offsetY)

Callback method to be invoked when the distance of currently dragging item is updated.

Parameters
offsetX The horizontal distance of currently dragging item from the initial position in pixels.
offsetY The vertical distance of currently dragging item from the initial position in pixels.

public abstract void onItemDragPositionChanged (int fromPosition, int toPosition)

Callback method to be invoked when item position is changed during drag.

Parameters
fromPosition The old position of the item.
toPosition The new position of the item

public abstract void onItemDragStarted (int position)

Callback method to be invoked when dragging is started.

Parameters
position The position of the item.