onPreIndirectTouchEvent
Common
Modifier in Compose Ui
Adding this [modifier][Modifier] to the [modifier][Modifier] parameter of a component will allow it to intercept [IndirectTouchEvent]s before a focused child receives it in [onIndirectTouchEvent], if it (or one of its children) is focused.
Last updated:
Installation
dependencies {
implementation("androidx.compose.ui:ui:1.9.0-alpha01")
}
Overloads
@ExperimentalComposeUiApi
fun Modifier.onPreIndirectTouchEvent(
onPreIndirectTouchEvent: (IndirectTouchEvent) -> Boolean
): Modifier
Parameters
name | description |
---|---|
onPreIndirectTouchEvent | This callback is invoked when a user interacts with a touch input device that is not associated with a touchscreen.s It gives ancestors of a focused component the chance to intercept an [IndirectTouchEvent]. Return true to indicate that you consumed the event and want to stop propagation of this event. |