SimpleItemTouchHelperCallback

ItemTouchHelper.Callback that enables swipe-to-dismiss on Content Card items. Drag-and-drop is disabled; only start-direction swipe is supported for dismissable items.

Parameters

adapter

The ItemTouchHelperAdapter that handles item dismissal.

Constructors

Link copied to clipboard
constructor(adapter: ItemTouchHelperAdapter)

Properties

Link copied to clipboard
Link copied to clipboard
open override val isItemViewSwipeEnabled: Boolean
Link copied to clipboard
open override val isLongPressDragEnabled: Boolean

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun clearView(@NonNull recyclerView: RecyclerView, @NonNull viewHolder: RecyclerView.ViewHolder)
Link copied to clipboard
open fun convertToAbsoluteDirection(flags: Int, layoutDirection: Int): Int
Link copied to clipboard
open fun getAnimationDuration(@NonNull recyclerView: RecyclerView, animationType: Int, animateDx: Float, animateDy: Float): Long
Link copied to clipboard
open override fun getMovementFlags(recyclerView: RecyclerView, viewHolder: RecyclerView.ViewHolder): Int
Link copied to clipboard
Link copied to clipboard
open fun getSwipeEscapeVelocity(defaultValue: Float): Float
Link copied to clipboard
Link copied to clipboard
open fun getSwipeVelocityThreshold(defaultValue: Float): Float
Link copied to clipboard
open fun interpolateOutOfBoundsScroll(@NonNull recyclerView: RecyclerView, viewSize: Int, viewSizeOutOfBounds: Int, totalSize: Int, msSinceStartScroll: Long): Int
Link copied to clipboard
open override fun isItemViewSwipeEnabled(): Boolean
Link copied to clipboard
open override fun isLongPressDragEnabled(): Boolean
Link copied to clipboard
open fun onChildDraw(@NonNull c: Canvas, @NonNull recyclerView: RecyclerView, @NonNull viewHolder: RecyclerView.ViewHolder, dX: Float, dY: Float, actionState: Int, isCurrentlyActive: Boolean)
Link copied to clipboard
open fun onChildDrawOver(@NonNull c: Canvas, @NonNull recyclerView: RecyclerView, viewHolder: RecyclerView.ViewHolder?, dX: Float, dY: Float, actionState: Int, isCurrentlyActive: Boolean)
Link copied to clipboard
open override fun onMove(recyclerView: RecyclerView, viewHolder: RecyclerView.ViewHolder, target: RecyclerView.ViewHolder): Boolean
Link copied to clipboard
open fun onMoved(@NonNull recyclerView: RecyclerView, @NonNull viewHolder: RecyclerView.ViewHolder, fromPos: Int, @NonNull target: RecyclerView.ViewHolder, toPos: Int, x: Int, y: Int)
Link copied to clipboard
open fun onSelectedChanged(@Nullable viewHolder: RecyclerView.ViewHolder?, actionState: Int)
Link copied to clipboard
open override fun onSwiped(viewHolder: RecyclerView.ViewHolder, direction: Int)