rememberOneHandedGestureConfiguration

Functions summary

OneHandedGestureConfiguration
@Composable
rememberOneHandedGestureConfiguration(
    action: GestureAction,
    key: String?,
    priority: GesturePriority
)

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

Functions

rememberOneHandedGestureConfiguration

@Composable
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: GestureAction

The gesture action to handle.

key: String? = null

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: GesturePriority = GesturePriority.Unspecified

The priority value; higher values take precedence if multiple handlers are registered for the same action.