SemanticsPropertyReceiver

interface SemanticsPropertyReceiver


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

Summary

Public functions

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

Extension properties

RemoteString?

Developer-set content description of the semantics node, for use in testing, accessibility and similar use cases.

Boolean

Whether the component is enabled.

Role?

The type of user interface element.

RemoteString?

Description of the state for the semantics node.

RemoteString?

Text content for the semantics node.

Public functions

set

Added in 1.0.0-alpha12
operator fun <T : Any?> set(key: SemanticsPropertyKey<T>, value: T?): Unit

Extension properties

SemanticsPropertyReceiver.contentDescription

var SemanticsPropertyReceiver.contentDescriptionRemoteString?

Developer-set content description of the semantics node, for use in testing, accessibility and similar use cases.

SemanticsPropertyReceiver.enabled

var SemanticsPropertyReceiver.enabledBoolean

Whether the component is enabled.

SemanticsPropertyReceiver.role

var SemanticsPropertyReceiver.roleRole?

The type of user interface element. Accessibility services can use this to describe the node.

SemanticsPropertyReceiver.stateDescription

var SemanticsPropertyReceiver.stateDescriptionRemoteString?

Description of the state for the semantics node.

SemanticsPropertyReceiver.text

var SemanticsPropertyReceiver.textRemoteString?

Text content for the semantics node.