Property

LocalOneHandedGestureEnabled

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

Source set: Android
public val LocalOneHandedGestureEnabled: ProvidableCompositionLocal<Boolean> = compositionLocalOf {
    true
}

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. Example usage:

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

Sample demonstrating how to disable gesture:

Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: