← Back to Compose UI
longPressGestureFilter
Modifier
in
Compose UI
. Since 0.1.0-dev15Overview
Examples
Community Notes
Responds to a pointer being "down" for an extended amount of time.
Note: this is likely a temporary, naive, and flawed approach. It is not necessarily guaranteed to interoperate well with forthcoming behavior related to disambiguation between multi-tap (double tap, triple tap) and tap.
Overloads
longPressGestureFilter
@Deprecated(
"Gesture filters are deprecated. Use Modifier.clickable or Modifier.pointerInput and " +
"detectTapGestures instead",
replaceWith = ReplaceWith(
"""pointerInput { detectTapGestures(onLongPress = onLongPress) }""",
"androidx.compose.ui.input.pointer.pointerInput",
"androidx.compose.foundation.gestures.detectTapGestures"
)
)
fun Modifier.longPressGestureFilter(
onLongPress: (Offset) -> Unit
)
Next ComponentAndroidView →