onRestoreSwipePosition

abstract fun onRestoreSwipePosition(viewHolder: SwipeViewHolder, adapterPosition: Int)

Invoked in order to set the viewHolder's initial state when bound. This supports view holder reuse. When items are scrolled off-screen and the view holder is reused, it becomes important to track the swiped state and determine if the view holder should appear as swiped for the item being bound.

Parameters

viewHolder

The view holder being bound.

adapterPosition

The internal adapter position of the item being bound.