ItemTouchUIUtil

interface ItemTouchUIUtil
androidx.recyclerview.widget.ItemTouchUIUtil

Utility class for ItemTouchHelper which handles item transformations for different API versions.

This class has methods that map to ItemTouchHelper.Callback's drawing methods. Default implementations in ItemTouchHelper.Callback call these methods with RecyclerView.ViewHolder#itemView and ItemTouchUIUtil makes necessary changes on the View depending on the API level. You can access the instance of ItemTouchUIUtil via ItemTouchHelper.Callback#getDefaultUIUtil() and call its methods with the children of ViewHolder that you want to apply default effects.

Summary

Public methods

abstract Unit
clearView(view: View!)

The default implementation for ItemTouchHelper.Callback#clearView(RecyclerView, * RecyclerView.ViewHolder)

abstract Unit
onDraw(c: Canvas!, recyclerView: RecyclerView!, view: View!, dX: Float, dY: Float, actionState: Int, isCurrentlyActive: Boolean)

The default implementation for ItemTouchHelper.Callback#onChildDraw(Canvas, * RecyclerView, RecyclerView.ViewHolder, float, float, int, boolean)

abstract Unit
onDrawOver(c: Canvas!, recyclerView: RecyclerView!, view: View!, dX: Float, dY: Float, actionState: Int, isCurrentlyActive: Boolean)

The default implementation for ItemTouchHelper.Callback#onChildDrawOver(Canvas, * RecyclerView, RecyclerView.ViewHolder, float, float, int, boolean)

abstract Unit
onSelected(view: View!)

The default implementation for ItemTouchHelper.Callback#onSelectedChanged( * RecyclerView.ViewHolder, int)

Public methods

clearView

abstract fun clearView(view: View!): Unit

The default implementation for ItemTouchHelper.Callback#clearView(RecyclerView, * RecyclerView.ViewHolder)

onDraw

abstract fun onDraw(c: Canvas!, recyclerView: RecyclerView!, view: View!, dX: Float, dY: Float, actionState: Int, isCurrentlyActive: Boolean): Unit

The default implementation for ItemTouchHelper.Callback#onChildDraw(Canvas, * RecyclerView, RecyclerView.ViewHolder, float, float, int, boolean)

onDrawOver

abstract fun onDrawOver(c: Canvas!, recyclerView: RecyclerView!, view: View!, dX: Float, dY: Float, actionState: Int, isCurrentlyActive: Boolean): Unit

The default implementation for ItemTouchHelper.Callback#onChildDrawOver(Canvas, * RecyclerView, RecyclerView.ViewHolder, float, float, int, boolean)

onSelected

abstract fun onSelected(view: View!): Unit

The default implementation for ItemTouchHelper.Callback#onSelectedChanged( * RecyclerView.ViewHolder, int)