Package-level declarations
Functions
Link copied to clipboard
suspend fun PointerInputScope.detectTapGesturesIf(predicate: (Offset) -> Boolean = { true }, onDoubleTap: (Offset) -> Unit? = null, onLongPress: (Offset) -> Unit? = null, onPress: suspend PressGestureScope.(Offset) -> Unit = NoPressGesture, onTap: (Offset) -> Unit? = null)
If predicate returns true: detects tap, double-tap, and long press gestures and calls onTap, onDoubleTap, and onLongPress, respectively, when detected. onPress is called when the press is detected and the PressGestureScope.tryAwaitRelease and PressGestureScope.awaitRelease can be used to detect when pointers have released or the gesture was canceled. The first pointer down and final pointer up are consumed, and in the case of long press, all changes after the long press is detected are consumed.