class CharactersFavoriteTouchHelper : SimpleCallback
Helper class customize touch behavior per RecyclerView.ViewHolder allowing to swipe.
See Also
ItemTouchHelper.SimpleCallback
<init> |
Helper class customize touch behavior per RecyclerView.ViewHolder allowing to swipe. CharactersFavoriteTouchHelper(onSwiped: (Int) -> Unit) |
onMove |
Called when ItemTouchHelper wants to move the dragged item from its old position to the new position. fun onMove(recyclerView: RecyclerView, viewHolder: ViewHolder, target: ViewHolder): Boolean |
onSwiped |
Called when a ViewHolder is swiped by the user. fun onSwiped(viewHolder: ViewHolder, direction: Int): Unit |