SwipeableDefaults
-
Cmn
object SwipeableDefaults
Contains useful defaults for swipeable and SwipeableState.
Summary
Constants |
||
|---|---|---|
const Float |
StandardResistanceFactor = 10.0fThis property is deprecated. Material's Swipeable has been replaced by Foundation's AnchoredDraggable APIs. |
Cmn
|
const Float |
StiffResistanceFactor = 20.0fThis property is deprecated. Material's Swipeable has been replaced by Foundation's AnchoredDraggable APIs. |
Cmn
|
Public functions |
||
|---|---|---|
ResistanceConfig? |
This function is deprecated. Material's Swipeable has been replaced by Foundation's AnchoredDraggable APIs. |
Cmn
|
Public properties |
||
|---|---|---|
SpringSpec<Float> |
This property is deprecated. Material's Swipeable has been replaced by Foundation's AnchoredDraggable APIs. |
Cmn
|
Dp |
This property is deprecated. Material's Swipeable has been replaced by Foundation's AnchoredDraggable APIs. |
Cmn
|
Constants
StandardResistanceFactor
const val StandardResistanceFactor = 10.0f: Float
A standard resistance factor which indicates that the user has run out of things to see.
StiffResistanceFactor
const val StiffResistanceFactor = 20.0f: Float
A stiff resistance factor which indicates that swiping isn't available right now.
Public functions
resistanceConfig
funresistanceConfig(
anchors: Set<Float>,
factorAtMin: Float = StandardResistanceFactor,
factorAtMax: Float = StandardResistanceFactor
): ResistanceConfig?
The default resistance config used by swipeable.
This returns null if there is one anchor. If there are at least two anchors, it returns a ResistanceConfig with the resistance basis equal to the distance between the two bounds.
Public properties
VelocityThreshold
val VelocityThreshold: Dp
The default velocity threshold (1.8 dp per millisecond) used by swipeable.