Epoxy Model Touch Callback
abstract class EpoxyModelTouchCallback<T : EpoxyModel?> : EpoxyTouchHelperCallback, EpoxyDragCallback<T> , EpoxySwipeCallback<T>
Content copied to clipboard
A wrapper around androidx.recyclerview.widget.ItemTouchHelper.Callback to enable easier touch support when working with Epoxy models.
For simplicity you can use EpoxyTouchHelper to set up touch handling via this class for you instead of using this class directly. However, you may choose to use this class directly with your own ItemTouchHelper if you need extra flexibility or customization.
Constructors
EpoxyModelTouchCallback
Link copied to clipboard
open fun EpoxyModelTouchCallback(@Nullable() controller: EpoxyController, targetModelClass: Class<T>)
Content copied to clipboard
Functions
canDropOver
Link copied to clipboard
open fun canDropOver(recyclerView: RecyclerView, current: RecyclerView.ViewHolder, target: RecyclerView.ViewHolder): Boolean
Content copied to clipboard
fun canDropOver(recyclerView: RecyclerView, current: RecyclerView.ViewHolder, target: RecyclerView.ViewHolder): Boolean
Content copied to clipboard
chooseDropTarget
Link copied to clipboard
open fun chooseDropTarget(selected: RecyclerView.ViewHolder, dropTargets: List<RecyclerView.ViewHolder>, curX: Int, curY: Int): RecyclerView.ViewHolder
Content copied to clipboard
fun chooseDropTarget(selected: RecyclerView.ViewHolder, dropTargets: List, curX: Int, curY: Int): RecyclerView.ViewHolder
Content copied to clipboard
clearView
Link copied to clipboard
open fun clearView(recyclerView: RecyclerView, viewHolder: RecyclerView.ViewHolder)
Content copied to clipboard
fun clearView(recyclerView: RecyclerView, viewHolder: RecyclerView.ViewHolder)
Content copied to clipboard
convertToAbsoluteDirection
Link copied to clipboard
open fun convertToAbsoluteDirection(flags: Int, layoutDirection: Int): Int
Content copied to clipboard
convertToRelativeDirection
Link copied to clipboard
open fun convertToRelativeDirection(flags: Int, layoutDirection: Int): Int
Content copied to clipboard
getAnimationDuration
Link copied to clipboard
open fun getAnimationDuration(recyclerView: RecyclerView, animationType: Int, animateDx: Float, animateDy: Float): Long
Content copied to clipboard
getBoundingBoxMargin
Link copied to clipboard
getDefaultUIUtil
Link copied to clipboard
getMovementFlags
Link copied to clipboard
abstract fun getMovementFlags(p: RecyclerView, p1: RecyclerView.ViewHolder): Int
Content copied to clipboard
fun getMovementFlags(recyclerView: RecyclerView, viewHolder: RecyclerView.ViewHolder): Int
Content copied to clipboard
getMovementFlagsForModel
Link copied to clipboard
abstract fun getMovementFlagsForModel(model: T, adapterPosition: Int): Int
Content copied to clipboard
getMoveThreshold
Link copied to clipboard
getSwipeEscapeVelocity
Link copied to clipboard
getSwipeThreshold
Link copied to clipboard
getSwipeVelocityThreshold
Link copied to clipboard
interpolateOutOfBoundsScroll
Link copied to clipboard
open fun interpolateOutOfBoundsScroll(recyclerView: RecyclerView, viewSize: Int, viewSizeOutOfBounds: Int, totalSize: Int, msSinceStartScroll: Long): Int
Content copied to clipboard
isItemViewSwipeEnabled
Link copied to clipboard
isLongPressDragEnabled
Link copied to clipboard
makeMovementFlags
Link copied to clipboard
onChildDraw
Link copied to clipboard
open fun onChildDraw(c: Canvas, recyclerView: RecyclerView, viewHolder: RecyclerView.ViewHolder, dX: Float, dY: Float, actionState: Int, isCurrentlyActive: Boolean)
Content copied to clipboard
fun onChildDraw(c: Canvas, recyclerView: RecyclerView, viewHolder: RecyclerView.ViewHolder, dX: Float, dY: Float, actionState: Int, isCurrentlyActive: Boolean)
Content copied to clipboard
onChildDrawOver
Link copied to clipboard
open fun onChildDrawOver(c: Canvas, recyclerView: RecyclerView, viewHolder: RecyclerView.ViewHolder, dX: Float, dY: Float, actionState: Int, isCurrentlyActive: Boolean)
Content copied to clipboard
fun onChildDrawOver(c: Canvas, recyclerView: RecyclerView, viewHolder: RecyclerView.ViewHolder, dX: Float, dY: Float, actionState: Int, isCurrentlyActive: Boolean)
Content copied to clipboard
onDragReleased
Link copied to clipboard
onDragStarted
Link copied to clipboard
onModelMoved
Link copied to clipboard
open fun onModelMoved(fromPosition: Int, toPosition: Int, modelBeingMoved: T, itemView: View)
Content copied to clipboard
Called after onDragStarted when the dragged view is dropped toa new position.
onMove
Link copied to clipboard
abstract fun onMove(p: RecyclerView, p1: RecyclerView.ViewHolder, p2: RecyclerView.ViewHolder): Boolean
Content copied to clipboard
fun onMove(recyclerView: RecyclerView, viewHolder: RecyclerView.ViewHolder, target: RecyclerView.ViewHolder): Boolean
Content copied to clipboard
onMoved
Link copied to clipboard
open fun onMoved(recyclerView: RecyclerView, viewHolder: RecyclerView.ViewHolder, fromPos: Int, target: RecyclerView.ViewHolder, toPos: Int, x: Int, y: Int)
Content copied to clipboard
fun onMoved(recyclerView: RecyclerView, viewHolder: RecyclerView.ViewHolder, fromPos: Int, target: RecyclerView.ViewHolder, toPos: Int, x: Int, y: Int)
Content copied to clipboard
onSelectedChanged
Link copied to clipboard
open fun onSelectedChanged(viewHolder: RecyclerView.ViewHolder, actionState: Int)
Content copied to clipboard
fun onSelectedChanged(viewHolder: RecyclerView.ViewHolder, actionState: Int)
Content copied to clipboard
onSwipeCompleted
Link copied to clipboard
open fun onSwipeCompleted(model: T, itemView: View, position: Int, direction: Int)
Content copied to clipboard
Called after onSwipeReleased if the swipe surpassed the threshold tobe considered a full swipe.
onSwiped
Link copied to clipboard
onSwipeProgressChanged
Link copied to clipboard
open fun onSwipeProgressChanged(model: T, itemView: View, swipeProgress: Float, canvas: Canvas)
Content copied to clipboard
Once a view has begun swiping with onSwipeStarted it willreceive this callback as the swipe distance changes.
onSwipeReleased
Link copied to clipboard
onSwipeStarted
Link copied to clipboard