OneHandedGestureConfiguration

class OneHandedGestureConfiguration


Represents the persistent specification for a one-handed gesture.

When creating OneHandedGestureConfiguration outside of tests, it is recommended to use the rememberOneHandedGestureConfiguration function.

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.

Summary

Public constructors

OneHandedGestureConfiguration(
    action: GestureAction,
    gestureId: String,
    priority: GesturePriority
)

Public functions

open operator Boolean
equals(other: Any?)
open Int

Public properties

GestureAction

The GestureAction associated with this gesture specification.

String

A unique identifier for this gesture instance.

GesturePriority

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

Public constructors

OneHandedGestureConfiguration

Added in 1.7.0-alpha07
OneHandedGestureConfiguration(
    action: GestureAction,
    gestureId: String,
    priority: GesturePriority = GesturePriority.Unspecified
)

Public functions

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

Public properties

action

val actionGestureAction

The GestureAction associated with this gesture specification.

gestureId

Added in 1.7.0-alpha07
val gestureIdString

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 ID 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

val priorityGesturePriority

The priority value; higher values take precedence if multiple handlers are registered for the same action. It is not recommended to register multiple gestures for the same action and priority (but if that is the case, all of them will be actioned).