onSwipeProgressChanged

open fun onSwipeProgressChanged(model: T, itemView: View, swipeProgress: Float, canvas: Canvas)

Once a view has begun swiping with onSwipeStarted it willreceive this callback as the swipe distance changes. This can be called multiple times as theswipe interaction progresses.

Parameters

model

The model representing the view that is being swiped

itemView

The view that is being swiped

swipeProgress

A float from -1 to 1 representing the percentage that the view has beenswiped relative to its width. This will be positive if the view is beingswiped to the right and negative if it is swiped to the left. Forexample,

canvas

The canvas on which RecyclerView is drawing its children. You can draw tothis to support custom swipe animations.