SwipeableListItem

Interface for the part of a ListItem that is able to be swiped.

Inheritors

Types

Link copied to clipboard
Stable states that the SwipeableListItem can be in.
Link copied to clipboard
States that the SwipeableListItem can be in.

Properties

Link copied to clipboard
val STATE_CLOSED: Int = 3
The state at which the associated RevealableListItem is closed and nothing is revealed.
Link copied to clipboard
The state at which the SwipeableListItem is being dragged.
Link copied to clipboard
val STATE_OPEN: Int = 4
The state at which the associated RevealableListItem is revealed to its intrinsic width.
Link copied to clipboard
The state at which the SwipeableListItem is settling to the nearest settling point.
Link copied to clipboard
The state at which the SwipeableListItem is fully swiped, meaning the primary action has been committed.

Functions

Link copied to clipboard
abstract fun getSwipeMaxOvershoot(): Int
Returns the overshoot, in pixels, that the SwipeableListItem is able to be swiped past the STATE_OPEN or STATE_SWIPE_PRIMARY_ACTION states by, before settling.
Link copied to clipboard
abstract fun isSwipeEnabled(): Boolean
Whether or not to allow the SwipeableListItem to be swiped.
Link copied to clipboard
abstract fun onSwipe(swipeOffset: Int)
Called when the position of the SwipeableListItem changes.
Link copied to clipboard
abstract fun <T : View?, RevealableListItem?> onSwipeStateChanged(swipeState: Int, @NonNull revealableListItem: T, revealGravity: Int)
Callback for when the swipe state of the SwipeableListItem changes.
Link copied to clipboard
abstract fun setSwipeEnabled(swipeEnabled: Boolean)
Sets whether or not to allow the SwipeableListItem to be swiped.