public object SwipeToRevealDefaults
Defaults for Material 3 SwipeToReveal.
Properties
LargeActionButtonHeight
public val LargeActionButtonHeight: Dp
Standard height for a large revealed action, such as when the swiped item is a Card.
LeftEdgeZoneFraction
public val LeftEdgeZoneFraction: Float
The default value used to configure the size of the left edge zone in a SwipeToReveal. The left edge zone in this case refers to the leftmost edge of the screen, in this region it is common to disable scrolling in order for swipe-to-dismiss handlers to take over.
bidirectionalGestureInclusion
public val bidirectionalGestureInclusion: GestureInclusion
A behaviour for SwipeToReveal to handle all gestures, intended for rare cases where RevealDirection.Bidirectional is used and no swipe events are ignored.
Functions
gestureInclusion
public fun gestureInclusion(
state: RevealState,
@FloatRange(from = 0.0, to = 1.0) edgeZoneFraction: Float = LeftEdgeZoneFraction,
): GestureInclusion
The default behaviour for when SwipeToReveal should handle gestures. In this implementation of GestureInclusion, swipe events that originate in the left edge of the screen (as determined by LeftEdgeZoneFraction) will be ignored, if the RevealState is Covered. This allows swipe-to-dismiss handlers (if present) to handle the gesture in this region.
Parameters
| state | RevealState of the SwipeToReveal. |
| edgeZoneFraction | The fraction of the screen width from the left edge where gestures should be ignored. Defaults to LeftEdgeZoneFraction. |