androidx.compose.ui.input.rotary
onPreRotaryScrollEvent
Function · from org.jetbrains.compose.ui:ui:1.12.2
No hand-written docs yet.
Adding this modifier``Modifier to the modifier``Modifier parameter of a component will allow it to intercept RotaryScrollEvents if it (or one of its children) is focused.
Parameters
fun Modifier.onPreRotaryScrollEvent(
onPreRotaryScrollEvent: (RotaryScrollEvent) -> Boolean,
): Modifier
onPreRotaryScrollEvent: (RotaryScrollEvent) -> BooleanRequired
onPreRotaryScrollEvent: (RotaryScrollEvent) -> BooleanRequiredThis callback is invoked when the user interacts with the rotary button on a wear device. It gives ancestors of a focused component the chance to intercept a RotaryScrollEvent. When the user rotates the side button on a wear device, a RotaryScrollEvent is sent to the focused item. Before reaching the focused item, this event starts at the root composable, and propagates down the hierarchy towards the focused item. It invokes any onPreRotaryScrollEvents it encounters on ancestors of the focused item. After reaching the focused item, the event propagates up the hierarchy back towards the parent. It invokes any onRotaryScrollEvents it encounters on its way back. Return true to indicate that you consumed the event and want to stop propagation of this event.