epoxy-adapter / com.airbnb.epoxy / EpoxyTouchHelper / SwipeBuilder3 / andCallbacks

andCallbacks

open fun andCallbacks(callbacks: EpoxyTouchHelper.SwipeCallbacks<U>!): ItemTouchHelper!

Set callbacks to handle swipe actions and lifecycle events.

You MUST implement SwipeCallbacks#onSwipeCompleted(EpoxyModel, View, int, int) to remove the swiped item from your data and request a model build.

You can optionally implement the other callbacks to modify the view as it is being swiped.

Return
ItemTouchHelper!: An ItemTouchHelper instance that has been initialized and attached to a recyclerview. The touch helper has already been fully set up and can be ignored, but you may want to hold a reference to it if you need to later detach the recyclerview to disable touch events via setting null on ItemTouchHelper#attachToRecyclerView(RecyclerView)