Compose Unstyled 2.0 is out! Check the official announcement blog ->
Property

LocalOneHandedGestureEnabled

CompositionLocal that controls whether one-handed gestures are enabled within the provided composition tree.

Source set: Android
public val LocalOneHandedGestureEnabled: ProvidableCompositionLocal<Boolean>

CompositionLocal that controls whether one-handed gestures are enabled within the provided composition tree.

When set to true (the default), any Modifier.oneHandedGesture applied within this composition scope will actively track and process one-handed gestures. When provided with false, those modifiers will gracefully ignore relevant touch events without being removed from the composition tree.

CompositionLocalProvider(LocalOneHandedGestureEnabled provides false) { // Any oneHandedGesture modifiers inside this component will be disabled MyEncapsulatedScreenContent()
}

Sample demonstrating how to disable gesture:

Last updated: