ItemTouchUIUtil


interface 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 itemView and ItemTouchUIUtil makes necessary changes on the View depending on the API level. You can access the instance of ItemTouchUIUtil via getDefaultUIUtil and call its methods with the children of ViewHolder that you want to apply default effects.
See also
getDefaultUIUtil

Summary

Public functions

Unit
clearView(view: View!)

The default implementation for clearView

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

The default implementation for onChildDraw

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

The default implementation for onChildDrawOver

Unit
onSelected(view: View!)

The default implementation for onSelectedChanged

Public functions

clearView

Added in 1.0.0
fun clearView(view: View!): Unit

The default implementation for clearView

onDraw

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

The default implementation for onChildDraw

onDrawOver

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

The default implementation for onChildDrawOver

onSelected

Added in 1.0.0
fun onSelected(view: View!): Unit

The default implementation for onSelectedChanged