app / sg.edu.ntu.scse.cz2006.gymbuddies.util / SwipeDeleteCallback / onMove

onMove

fun onMove(recyclerView: RecyclerView, viewHolder: ViewHolder, target: ViewHolder): Boolean

Called when ItemTouchHelper wants to move the dragged item from its old position to the new position.

If this method returns true, ItemTouchHelper assumes viewHolder has been moved to the adapter position of target ViewHolder ({@link ViewHolder#getAdapterPosition() ViewHolder#getAdapterPosition()}).

If you don't support drag & drop, this method will never be called.

Parameters

recyclerView - The RecyclerView to which ItemTouchHelper is attached to.

viewHolder - The ViewHolder which is being dragged by the user.

target - The ViewHolder over which the currently active item is being dragged.

Return
True if the viewHolder has been moved to the adapter position of {@code target}.