The Developer Preview for Android 11 is now available; test it out and share your feedback.

SemanticsConfiguration

class SemanticsConfiguration : SemanticsPropertyReceiver, Iterable<Entry<SemanticsPropertyKey<*>, Any?>>
kotlin.Any
   ↳ androidx.ui.core.semantics.SemanticsConfiguration

Describes the semantic information associated with the owning component

The information provided in the configuration is used to to generate the semantics tree.

Summary

Public constructors

Describes the semantic information associated with the owning component

Public methods

operator Boolean

SemanticsConfiguration

Returns an exact copy of this configuration.

Boolean
equals(other: Any?)

operator T

Retrieves the value for the given property, if one has been set.

T
getOrElse(key: SemanticsPropertyKey<T>, defaultValue: () -> T)

T?
getOrElseNullable(key: SemanticsPropertyKey<T>, defaultValue: () -> T?)

Int

Iterator<Entry<SemanticsPropertyKey<*>, Any?>>

Unit
set(key: SemanticsPropertyKey<T>, value: T)

String

Extension functions

From androidx.ui.test
Unit

SemanticsConfiguration

Returns a (mutated) copy of the original SemanticsConfiguration object.

From androidx.ui.core.semantics
T?

Inherited extension functions

From androidx.ui.semantics
Unit
SemanticsPropertyReceiver.ScrollTo(label: String? = null, action: (x: Px, y: Px) -> Unit)

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

From androidx.compose
operator T

IMPORTANT: This global operator is TEMPORARY, and should be removed whenever an answer for contextual composers is reached.

Properties

Boolean

Whether this configuration is empty.

Boolean

Whether the semantic information provided by the owning component and all of its descendants should be treated as one logical entity.

Boolean

Whether the owner of this configuration wants to own its own SemanticsNode.

Inherited extension properties

From androidx.ui.semantics
AccessibilityAction<(x: Px, y: Px) -> Unit>

String

String

AccessibilityRangeInfo

List<AccessibilityAction<() -> Unit>>

Boolean

Boolean

AccessibilityAction<() -> Unit>

String

TextDirection

From androidx.ui.foundation.semantics
Boolean

Boolean

ToggleableState

Public constructors

<init>

SemanticsConfiguration()

Describes the semantic information associated with the owning component

The information provided in the configuration is used to to generate the semantics tree.

Public methods

contains

operator fun <T> contains(key: SemanticsPropertyKey<T>): Boolean

copy

fun copy(): SemanticsConfiguration

Returns an exact copy of this configuration.

equals

fun equals(other: Any?): Boolean

get

operator fun <T> get(key: SemanticsPropertyKey<T>): T

Retrieves the value for the given property, if one has been set. If a value has not been set, throws IllegalStateException

getOrElse

fun <T> getOrElse(
    key: SemanticsPropertyKey<T>,
    defaultValue: () -> T
): T

getOrElseNullable

fun <T> getOrElseNullable(
    key: SemanticsPropertyKey<T>,
    defaultValue: () -> T?
): T?

hashCode

fun hashCode(): Int

iterator

fun iterator(): Iterator<Entry<SemanticsPropertyKey<*>, Any?>>

set

fun <T> set(
    key: SemanticsPropertyKey<T>,
    value: T
): Unit

toString

fun toString(): String

Properties

isEmpty

val isEmpty: Boolean

Whether this configuration is empty.

An empty configuration doesn't contain any semantic information that it wants to contribute to the semantics tree.

isMergingSemanticsOfDescendants

var isMergingSemanticsOfDescendants: Boolean

Whether the semantic information provided by the owning component and all of its descendants should be treated as one logical entity.

If set to true, the descendants of the owning component's SemanticsNode will merge their semantic information into the SemanticsNode representing the owning component.

Setting this to true requires that isSemanticBoundary is also true.

isSemanticBoundary

var isSemanticBoundary: Boolean

Whether the owner of this configuration wants to own its own SemanticsNode.

When set to true semantic information associated with the owner of this configuration or any of its descendants will not leak into parents. The SemanticsNode generated out of this configuration will act as a boundary.

This has to be true if isMergingSemanticsOfDescendants is also true.