public static interface

ColumnReorderDetector.OnColumnReorderListener

com.shinobicontrols.grids.supplement.ColumnReorderDetector.OnColumnReorderListener
Known Indirect Subclasses

Class Overview

Callback to be invoked when a column on the grid has been reordered.

This listener provides an opportunity to update the list of Column objects held by the ShinobiGridView when a column reorder event has taken place.

See Also

Summary

Public Methods
abstract void onColumnIndexChanged(int columnIndex, int fromColumnIndex, int toColumnIndex, GridRecyclerView gridRecyclerView)

The callback method to be invoked during a reorder event when a column has been moved enough for it to have been deemed to have changed places with an adjacent column.

abstract void onColumnReorderCancelled(int columnIndex, GridRecyclerView gridRecyclerView)

The callback method to be invoked when a reorder event is cancelled.

abstract void onColumnReorderEnded(int columnIndex, int endColumnIndex, GridRecyclerView gridRecyclerView)

The callback method to be invoked when a reorder event that has been performed on a column in the grid has ended.

abstract void onColumnReorderStarted(int columnIndex, GridRecyclerView gridRecyclerView)

The callback method to be invoked when a reorder event is started on a column in the grid.

Public Methods

public abstract void onColumnIndexChanged (int columnIndex, int fromColumnIndex, int toColumnIndex, GridRecyclerView gridRecyclerView)

The callback method to be invoked during a reorder event when a column has been moved enough for it to have been deemed to have changed places with an adjacent column. This will be called multiple times as the user drags their finger horizontally across the ShinobiGridView.

Parameters
columnIndex the index of the column that is being reordered
fromColumnIndex the index that the column being reordered has moved from due to dragging
toColumnIndex the index that the column being reordered has moved to due to dragging
gridRecyclerView the GridRecyclerView on which the reordering event was initiated

public abstract void onColumnReorderCancelled (int columnIndex, GridRecyclerView gridRecyclerView)

The callback method to be invoked when a reorder event is cancelled. More specifically, this is when the column has been dragged to somewhere deemed invalid for the grid, for example, out of its bounds.

Parameters
columnIndex the index of the column that was being reordered
gridRecyclerView the GridRecyclerView on which the reordering event was initiated

public abstract void onColumnReorderEnded (int columnIndex, int endColumnIndex, GridRecyclerView gridRecyclerView)

The callback method to be invoked when a reorder event that has been performed on a column in the grid has ended. More specifically, this will be called at the end of a drag gesture, that is when the user lifts up their finger.

If at the end of the drag gesture the column has not been dragged far enough from its original position this method will be called with both parameters being the same value.

Parameters
columnIndex the index of the column that is being reordered
endColumnIndex the index that the column being reordered has moved to at the end of the reorder event
gridRecyclerView the GridRecyclerView on which the reordering event was initiated

public abstract void onColumnReorderStarted (int columnIndex, GridRecyclerView gridRecyclerView)

The callback method to be invoked when a reorder event is started on a column in the grid. More specifically, this will be called when the user long presses a column. For the rest of the reorder event this column will be used as the reference point.

Parameters
columnIndex the index of the column that is being reordered
gridRecyclerView the GridRecyclerView on which the reordering event was initiated