Start native apps faster with the Composables CLI ->
Class

OneHandedGesturePriority

Defines the fixed precedence levels for one-handed gesture interception.

Source set: Android
public class OneHandedGesturePriority private constructor(internal val value: Int)

Defines the fixed precedence levels for one-handed gesture interception.

This priority system is used to resolve conflicts when multiple components in a UI hierarchy are eligible to handle a gesture action. Because the system cannot automatically determine intent in overlapping areas, developers should assign one of these predefined priority levels to their components to establish a functional gesture hierarchy.

For gestures with the same action, higher priority values take precedence over lower ones, so that Clickable takes priority over Scrollable. 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)

Members

Companion

Source set: Android
public companion object

Properties

Unspecified

Source set: Android
public val Unspecified: OneHandedGesturePriority = OneHandedGesturePriority(0)

Default priority level.

Used when no specific priority is defined. This level typically yields to any other specified gesture priority.

Scrollable

Source set: Android
public val Scrollable: OneHandedGesturePriority = OneHandedGesturePriority(100)

Priority for general scrollable areas, such as lists, pagers or containers.

This level but yields to Clickable elements to ensure interactive controls remain accessible within a scrollable parent.

Clickable

Source set: Android
public val Clickable: OneHandedGesturePriority = OneHandedGesturePriority(200)

Priority for interactive components like buttons, switches, or chips.

This is the highest priority tier. It must be used on individual controls to ensure they capture gestures before their containing scrollable or pageable parents.