Google is committed to advancing racial equity for Black communities. See how.

SemanticsConfiguration

class SemanticsConfiguration : SemanticsPropertyReceiver, Iterable<Entry<SemanticsPropertyKey<*>, Any?>>
kotlin.Any
   ↳ androidx.compose.ui.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.compose.ui.semantics
T?

Inherited extension functions
From androidx.compose.ui.semantics
Unit
SemanticsPropertyReceiver.copyText(label: String? = null, action: () -> Boolean)

This function adds the SemanticsActions.CopyText to the SemanticsPropertyReceiver.

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

This function adds the SemanticsActions.CutText to the SemanticsPropertyReceiver.

Unit

Whether this element is a Dialog.

Unit

Whether this semantics node is disabled.

Unit

This function adds the SemanticsActions.GetTextLayoutResult to the SemanticsPropertyReceiver.

Unit

Whether this semantics node is hidden.

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

This function adds the SemanticsActions.OnClick to the SemanticsPropertyReceiver.

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

This function adds the SemanticsActions.OnLongClick to the SemanticsPropertyReceiver.

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

This function adds the SemanticsActions.PasteText to the SemanticsPropertyReceiver.

Unit

Whether this semantics node represents a Popup.

Unit
SemanticsPropertyReceiver.scrollBy(label: String? = null, action: (x: Float, y: Float) -> Boolean)

This function adds the SemanticsActions.ScrollBy to the SemanticsPropertyReceiver.

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

This function adds the SemanticsActions.SetProgress to the SemanticsPropertyReceiver.

Unit
SemanticsPropertyReceiver.setSelection(label: String? = null, action: (startIndex: Int, endIndex: Int, traversalMode: Boolean) -> Boolean)

This function adds the SemanticsActions.SetSelection to the SemanticsPropertyReceiver.

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

This function adds the SemanticsActions.SetText to the SemanticsPropertyReceiver.

From androidx.compose.foundation.text
Unit

Whether the component supports input methods.

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.

Inherited extension properties
From androidx.compose.ui.semantics
String

Developer-set content description of the semantics node.

String

Developer-set state description of the semantics node.

AccessibilityRangeInfo

The node is a range with current value.

List<CustomAccessibilityAction>

Custom actions which are defined by app developers.

Boolean

Whether this semantics node is focused.

AccessibilityScrollState

The horizontal scroll state of this node if this node is scrollable.

String

Test tag attached to this semantics node.

AnnotatedString

Text of the semantics node.

TextRange

Text selection range for edit text.

AccessibilityScrollState

The vertical scroll state of this node if this node is scrollable.

From androidx.compose.foundation.text
ImeAction

Contains the IME action provided by the node.

From androidx.compose.foundation.semantics
Boolean

Whether this element is in a group from which only a single item can be selected at any given time (such as a radio group)

Boolean

Whether this element is selected (out of a list of possible selections).

ToggleableState

The state of a toggleable component.

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.