Start native apps faster with the Composables CLI ->
Composable Function

rememberOneHandedGestureConfiguration

A OneHandedGestureConfiguration should be created for each component that supports a gesture, such as a Button, Card or scrollable container.

rememberOneHandedGestureConfiguration

Source set: Android
@Composable
public fun rememberOneHandedGestureConfiguration(
    action: GestureAction,
    key: String? = null,
    priority: GesturePriority = GesturePriority.Unspecified,
): OneHandedGestureConfiguration

A OneHandedGestureConfiguration should be created for each component that supports a gesture, such as a Button, Card or scrollable container.

Note: It is not recommended to register multiple gestures for the same action and priority. If multiple gestures are registered with identical actions and priorities, all of them will be actioned simultaneously.

Parameters

action The gesture action to handle.
key A unique identifier for this gesture instance. This ID allows the system to track user interactions - for example, to mute gesture indicators that have been frequently shown or successfully performed, in accordance with user preferences. If the same key is reused across multiple gestures, they will share a common interaction history (such as frequency-based gesture indicator display logic). Note that this only affects the presentation of the UI; the underlying logic and handling remain independent for each instance.
priority The priority value; higher values take precedence if multiple handlers are registered for the same action.

Returns

Last updated: