Google 致力于为黑人社区推动种族平等。查看具体举措

androidx.compose.ui.semantics

Interfaces

SemanticsModifier

A Modifier.Element that adds semantics key/value for use in testing, accessibility, and similar use cases.

SemanticsPropertyReceiver

SemanticsPropertyReceiver is the scope provided by semantics {} blocks, letting you set key/value pairs primarily via extension functions.

Classes

AccessibilityAction

Standard accessibility action.

CustomAccessibilityAction

Custom accessibility action.

ProgressBarRangeInfo

Accessibility range information, to represent the status of a progress bar or seekable progress bar.

ScrollAxisRange

The scroll state of one axis if this node is scrollable.

SemanticsConfiguration

Describes the semantic information associated with the owning component

SemanticsNode

A list of key/value pairs associated with a layout node or its subtree.

SemanticsOwner

Owns SemanticsNode objects and notifies listeners of changes to the semantics tree

SemanticsPropertyKey

SemanticsPropertyKey is the infrastructure for setting key/value pairs inside semantics blocks in a type-safe way.

Enums

Role

The type of user interface element.

Extension functions summary

For Modifier
Modifier

Clears the semantics of all the descendant nodes and sets new semantics.

Modifier
Modifier.semantics(mergeDescendants: Boolean = false, properties: SemanticsPropertyReceiver.() -> Unit)

Add semantics key/value pairs to the layout node, for use in testing, accessibility, etc.

For SemanticsPropertyReceiver
Unit
SemanticsPropertyReceiver.collapse(label: String? = null, action: () -> Boolean)

Action to collapse an expandable node.

Unit
SemanticsPropertyReceiver.copyText(label: String? = null, action: () -> Boolean)

Action to copy the text to the clipboard.

Unit
SemanticsPropertyReceiver.cutText(label: String? = null, action: () -> Boolean)

Action to cut the text and copy it to the clipboard.

Unit

Whether this element is a Dialog.

Unit

Whether this semantics node is disabled.

Unit
SemanticsPropertyReceiver.dismiss(label: String? = null, action: () -> Boolean)

Action to dismiss a dismissible node.

Unit
SemanticsPropertyReceiver.expand(label: String? = null, action: () -> Boolean)

Action to expand an expandable node.

Unit

Action to get a Text/TextField node's TextLayoutResult.

Unit

The node is marked as heading for accessibility.

Unit

Whether this node is specially known to be invisible to the user.

Unit
SemanticsPropertyReceiver.onClick(label: String? = null, action: () -> Boolean)

Action to be performed when the node is clicked (single-tapped).

Unit