SwipeCallbacks

abstract class SwipeCallbacks<T : EpoxyModel?> : EpoxySwipeCallback<T>

Functions

clearView
Link copied to clipboard
open fun clearView(model: T, itemView: View)
Called when the user interaction with a view is over and the view hascompleted its animation.
getMovementFlagsForModel
Link copied to clipboard
fun getMovementFlagsForModel(model: T, adapterPosition: Int): Int
Should return a composite flag which defines the enabled move directions in each state(idle, swiping, dragging) for the given model.
isSwipeEnabledForModel
Link copied to clipboard
open fun isSwipeEnabledForModel(model: T): Boolean
Whether the given model should be swipable.
onSwipeCompleted
Link copied to clipboard
abstract fun onSwipeCompleted(model: T, itemView: View, position: Int, direction: Int)
Called after onSwipeReleased if the swipe surpassed the threshold tobe considered a full swipe.
onSwipeProgressChanged
Link copied to clipboard
abstract 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.
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.
onSwipeReleased
Link copied to clipboard
open fun onSwipeReleased(model: T, itemView: View)
Called when the user has released their touch on the view.
onSwipeStarted
Link copied to clipboard
open fun onSwipeStarted(model: T, itemView: View, adapterPosition: Int)
Called when the view switches from an idle state to a swiped state, as the user begins a swipeinteraction with it.