Google berkomitmen untuk mendorong terwujudnya keadilan rasial bagi komunitas Kulit Hitam. Lihat caranya.

androidx.ui.core.semantics

Interfaces

SemanticsModifier

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

Classes

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

Extension functions summary

For SemanticsNode
SemanticsNode?

Executes selector on every parent of this SemanticsNode and returns the closest SemanticsNode to return true from selector or null if selector returns false for all ancestors.

For SemanticsOwner
List<SemanticsNode>

Finds all SemanticsNodes in the tree owned by this SemanticsOwner.

For SemanticsConfiguration
T?

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

Add semantics key/value for use in testing, accessibility, and similar use cases.

Extension functions

findClosestParentNode

fun SemanticsNode.findClosestParentNode(selector: (SemanticsNode) -> Boolean): SemanticsNode?

Executes selector on every parent of this SemanticsNode and returns the closest SemanticsNode to return true from selector or null if selector returns false for all ancestors.

getAllSemanticsNodes

fun SemanticsOwner.getAllSemanticsNodes(mergingEnabled: Boolean): List<SemanticsNode>

Finds all SemanticsNodes in the tree owned by this SemanticsOwner. Return the results in a list.

getOrNull

fun <T> SemanticsConfiguration.getOrNull(key: SemanticsPropertyKey<T>): T?

semantics

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

Add semantics key/value for use in testing, accessibility, and similar use cases.

Parameters
mergeAllDescendants: Boolean = false Whether the semantic information provided by the owning component and all of its descendants should be treated as one logical entity.
properties: SemanticsPropertyReceiver.() -> Unit properties to add to the semantics. SemanticsPropertyReceiver will be provided in the scope to allow access for common properties and its values.