Object

SemanticsActions

Ths object defines keys of the actions which can be set in semantics and performed on the semantics node.

RevenueCat

RevenueCat

Add subscriptions to your apps in minutes

Ad Get started for free
Common
/*@VisibleForTesting*/
object SemanticsActions

Ths object defines keys of the actions which can be set in semantics and performed on the semantics node.

Each of these is intended to be set by the respective SemanticsPropertyReceiver extension instead of used directly.

Properties

Common
val GetTextLayoutResult =
    ActionPropertyKey<(MutableList<TextLayoutResult>) -> Boolean>("GetTextLayoutResult")
Common
val OnClick = ActionPropertyKey<() -> Boolean>("OnClick")
Common
val OnLongClick = ActionPropertyKey<() -> Boolean>("OnLongClick")
Common
val ScrollBy = ActionPropertyKey<(x: Float, y: Float) -> Boolean>("ScrollBy")
Common
val ScrollByOffset = SemanticsPropertyKey<suspend (offset: Offset) -> Offset>("ScrollByOffset")
Common
val ScrollToIndex = ActionPropertyKey<(Int) -> Boolean>("ScrollToIndex")
Common
Deprecated Use SemanticsActions.OnFillData instead.
val OnAutofillText = ActionPropertyKey<(AnnotatedString) -> Boolean>("OnAutofillText")
Common
val OnFillData = ActionPropertyKey<(FillableData) -> Boolean>("OnFillData")
Common
val SetProgress = ActionPropertyKey<(progress: Float) -> Boolean>("SetProgress")
Common
val SetSelection = ActionPropertyKey<(Int, Int, Boolean) -> Boolean>("SetSelection")
Common
val SetText = ActionPropertyKey<(AnnotatedString) -> Boolean>("SetText")
Common
val SetTextSubstitution = ActionPropertyKey<(AnnotatedString) -> Boolean>("SetTextSubstitution")
Common
val ShowTextSubstitution = ActionPropertyKey<(Boolean) -> Boolean>("ShowTextSubstitution")
Common
val ClearTextSubstitution = ActionPropertyKey<() -> Boolean>("ClearTextSubstitution")
Common
val InsertTextAtCursor = ActionPropertyKey<(AnnotatedString) -> Boolean>("InsertTextAtCursor")
Common
val OnImeAction = ActionPropertyKey<() -> Boolean>("PerformImeAction")
Common
Deprecated Use SemanticsActions.OnImeAction instead.
val PerformImeAction = ActionPropertyKey<() -> Boolean>("PerformImeAction")
Common
val CopyText = ActionPropertyKey<() -> Boolean>("CopyText")
Common
val CutText = ActionPropertyKey<() -> Boolean>("CutText")
Common
val PasteText = ActionPropertyKey<() -> Boolean>("PasteText")
Common
val Expand = ActionPropertyKey<() -> Boolean>("Expand")
Common
val Collapse = ActionPropertyKey<() -> Boolean>("Collapse")
Common
val Dismiss = ActionPropertyKey<() -> Boolean>("Dismiss")
Common
val RequestFocus = ActionPropertyKey<() -> Boolean>("RequestFocus")
Common
val CustomActions =
    AccessibilityKey<List<CustomAccessibilityAction>>(
        name = "CustomActions",
        mergePolicy = { parentValue, childValue -> parentValue.orEmpty() + childValue },
    )
Common
val PageUp = ActionPropertyKey<() -> Boolean>("PageUp")
Common
val PageLeft = ActionPropertyKey<() -> Boolean>("PageLeft")
Common
val PageDown = ActionPropertyKey<() -> Boolean>("PageDown")
Common
val PageRight = ActionPropertyKey<() -> Boolean>("PageRight")
Common
val GetScrollViewportLength =
    ActionPropertyKey<(MutableList<Float>) -> Boolean>("GetScrollViewportLength")