com.h6ah4i.android.widget.advrecyclerview.expandable.ExpandableDraggableItemAdapter<GVH extends android.support.v7.widget.RecyclerView.ViewHolder, CVH extends android.support.v7.widget.RecyclerView.ViewHolder> |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract boolean |
onCheckChildCanDrop(int draggingGroupPosition, int draggingChildPosition, int dropGroupPosition, int dropChildPosition)
Called while dragging in order to check whether the dragging item can be dropped to the specified position.
| ||||||||||
abstract boolean |
onCheckChildCanStartDrag(CVH holder, int groupPosition, int childPosition, int x, int y)
Called when user is attempt to drag the child item.
| ||||||||||
abstract boolean |
onCheckGroupCanDrop(int draggingGroupPosition, int dropGroupPosition)
Called while dragging in order to check whether the dragging item can be dropped to the specified position.
| ||||||||||
abstract boolean |
onCheckGroupCanStartDrag(GVH holder, int groupPosition, int x, int y)
Called when user is attempt to drag the group item.
| ||||||||||
abstract ItemDraggableRange |
onGetChildItemDraggableRange(CVH holder, int groupPosition, int childPosition)
Called after the
onCheckChildCanStartDrag(android.support.v7.widget.RecyclerView.ViewHolder, int, int, int, int) method returned true. | ||||||||||
abstract ItemDraggableRange |
onGetGroupItemDraggableRange(GVH holder, int groupPosition)
Called after the
onCheckGroupCanStartDrag(android.support.v7.widget.RecyclerView.ViewHolder, int, int, int) method returned true. | ||||||||||
abstract void |
onMoveChildItem(int fromGroupPosition, int fromChildPosition, int toGroupPosition, int toChildPosition)
Called when child item is moved.
| ||||||||||
abstract void |
onMoveGroupItem(int fromGroupPosition, int toGroupPosition)
Called when group item is moved.
|
Called while dragging in order to check whether the dragging item can be dropped to the specified position.
NOTE: This method will be called when the checkCanDrop option is enabled by setCheckCanDropEnabled(boolean)
.
draggingGroupPosition | The group position of the currently dragging item. |
---|---|
draggingChildPosition | The child position of the currently dragging item. |
dropGroupPosition | The group position to check whether the dragging item can be dropped or not. |
dropChildPosition | The child position to check whether the dragging item can be dropped or not. |
Called when user is attempt to drag the child item.
holder | The child ViewHolder which is associated to item user is attempt to start dragging. |
---|---|
groupPosition | Group position. |
childPosition | Child position. |
x | Touched X position. Relative from the itemView's top-left. |
y | Touched Y position. Relative from the itemView's top-left. |
Called while dragging in order to check whether the dragging item can be dropped to the specified position.
NOTE: This method will be called when the checkCanDrop option is enabled by setCheckCanDropEnabled(boolean)
.
draggingGroupPosition | The position of the currently dragging group item. |
---|---|
dropGroupPosition | The position of a group item whether to check can be dropped or not. |
Called when user is attempt to drag the group item.
holder | The group ViewHolder which is associated to item user is attempt to start dragging. |
---|---|
groupPosition | Group position. |
x | Touched X position. Relative from the itemView's top-left. |
y | Touched Y position. Relative from the itemView's top-left. |
Called after the onCheckChildCanStartDrag(android.support.v7.widget.RecyclerView.ViewHolder, int, int, int, int)
method returned true.
holder | The ViewHolder which is associated to item user is attempt to start dragging. |
---|---|
groupPosition | Group position. |
childPosition | Child position. |
Called after the onCheckGroupCanStartDrag(android.support.v7.widget.RecyclerView.ViewHolder, int, int, int)
method returned true.
holder | The ViewHolder which is associated to item user is attempt to start dragging. |
---|---|
groupPosition | Group position. |
Called when child item is moved. Should apply the move operation result to data set.
fromGroupPosition | Previous group position of the item. |
---|---|
fromChildPosition | Previous child position of the item. |
toGroupPosition | New group position of the item. |
toChildPosition | New child position of the item. |
Called when group item is moved. Should apply the move operation result to data set.
fromGroupPosition | Previous group position of the item. |
---|---|
toGroupPosition | New group position of the item. |