public static interface

ItemDragDetector.OnItemDragListener

com.shinobicontrols.grids.supplement.ItemDragDetector.OnItemDragListener
Known Indirect Subclasses

Class Overview

Callback to be invoked when an item in the grid has been long pressed and dragged.

Summary

Public Methods
abstract void onItemDrag(ItemDragDetector itemDragDetector, float x, float y, GridRecyclerView gridRecyclerView)

The callback method to be invoked while a drag gesture is being performed over items in the grid.

abstract void onItemReleaseDrag(ItemDragDetector itemDragDetector, float x, float y, GridRecyclerView gridRecyclerView)

The callback method to be invoked when a drag gesture is completed.

abstract void onItemStartDrag(ItemDragDetector itemDragDetector, float x, float y, GridRecyclerView gridRecyclerView)

The callback method to be invoked when the start of a drag gesture is performed on an item in the grid.

Public Methods

public abstract void onItemDrag (ItemDragDetector itemDragDetector, float x, float y, GridRecyclerView gridRecyclerView)

The callback method to be invoked while a drag gesture is being performed over items in the grid. More specifically, this will be called at the end of each move gesture once a drag has been initiated by means of a long press. The given x and y values can be used with the getItemPosition(RecyclerView, float, float) method to obtain the position of the item in the ShinobiGridView at those co-ordinates.

To translate this position into a column index or a row index use the getColumnIndexForPosition(int) and getRowIndexForPosition(int) methods.

Parameters
itemDragDetector the ItemDragDetector detecting the drag gesture
x the x coordinate of the pointer at the end of the move event
y the y coordinate of the pointer at the end of the move event
gridRecyclerView the RecyclerView on which the drag gesture is performed

public abstract void onItemReleaseDrag (ItemDragDetector itemDragDetector, float x, float y, GridRecyclerView gridRecyclerView)

The callback method to be invoked when a drag gesture is completed. More specifically, this will be called when the gesture is released at the end of a drag. The given x and y values can be used with the getItemPosition(RecyclerView, float, float) method to obtain the position of the item in the ShinobiGridView at those co-ordinates.

To translate this position into a column index or a row index use the getColumnIndexForPosition(int) and getRowIndexForPosition(int) methods.

Parameters
itemDragDetector the ItemDragDetector detecting the drag gesture
x the x coordinate of the pointer at the end of the drag gesture
y the y coordinate of the pointer at the end of the drag gesture
gridRecyclerView the GridRecyclerView on which the drag gesture is performed

public abstract void onItemStartDrag (ItemDragDetector itemDragDetector, float x, float y, GridRecyclerView gridRecyclerView)

The callback method to be invoked when the start of a drag gesture is performed on an item in the grid. More specifically, this will be called on the end of a long press gesture. The given x and y values can be used with the getItemPosition(RecyclerView, float, float) method to obtain the position of the item in the ShinobiGridView at those co-ordinates.

To translate this position into a column index or a row index use the getColumnIndexForPosition(int) and getRowIndexForPosition(int) methods.

Parameters
itemDragDetector the ItemDragDetector detecting the drag gesture
x the x coordinate of the pointer at the start of the drag gesture
y the y coordinate of the pointer at the start of the drag gesture
gridRecyclerView the GridRecyclerView on which the drag gesture is performed