androidx.compose.foundation.gestures

PressGestureScope

Interface · from org.jetbrains.compose.foundation:foundation:1.12.2

No hand-written docs yet.

Receiver scope for detectTapGestures's onPress lambda. This offers two methods to allow waiting for the press to be released.

interface PressGestureScope : Density

Is a

Functions

awaitRelease

fun awaitRelease()

Waits for the press to be released before returning. If the gesture was canceled by motion being consumed by another gesture, GestureCancellationException will be thrown.

tryAwaitRelease

fun tryAwaitRelease(): Boolean

Waits for the press to be released before returning. If the press was released, true is returned, or if the gesture was canceled by motion being consumed by another gesture, false is returned.

Library docs

Receiver scope for detectTapGestures's onPress lambda. This offers two methods to allow waiting for the press to be released.