Object

SwipeToRevealDefaults

An internal object containing some defaults used across the Swipe to reveal component.

RevenueCat

RevenueCat

Add subscriptions to your apps in minutes

Ad Get started for free
Android
Deprecated The SwipeToReveal component from the latest material library should be used instead. This will be removed in a future release of this library.
@ExperimentalWearFoundationApi
public object SwipeToRevealDefaults

An internal object containing some defaults used across the Swipe to reveal component.

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 RevealValue.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.