ModifiersBuilders.Semantics.Builder


class ModifiersBuilders.Semantics.Builder


Builder for Semantics

Summary

Public constructors

Creates an instance of Builder.

Public functions

ModifiersBuilders.Semantics

Builds an instance from accumulated values.

ModifiersBuilders.Semantics.Builder
@RequiresSchemaVersion(major = 1, minor = 0)
setContentDescription(contentDescription: String)

Sets the content description associated with this element.

ModifiersBuilders.Semantics.Builder
@RequiresSchemaVersion(major = 1, minor = 0)
setContentDescription(contentDescription: TypeBuilders.StringProp)

Sets the content description associated with this element.

ModifiersBuilders.Semantics.Builder
@RequiresSchemaVersion(major = 1, minor = 200)
setRole(role: Int)

Sets the type of user interface element.

ModifiersBuilders.Semantics.Builder
@RequiresSchemaVersion(major = 1, minor = 200)
setStateDescription(stateDescription: TypeBuilders.StringProp)

Sets the localized state description of the semantics node.

Public constructors

Builder

Added in 1.0.0
Builder()

Creates an instance of Builder.

Public functions

build

Added in 1.0.0
fun build(): ModifiersBuilders.Semantics

Builds an instance from accumulated values.

setContentDescription

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 0)
fun setContentDescription(contentDescription: String): ModifiersBuilders.Semantics.Builder

Sets the content description associated with this element. This will be dictated when the element is focused by the screen reader.

setContentDescription

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 0)
fun setContentDescription(contentDescription: TypeBuilders.StringProp): ModifiersBuilders.Semantics.Builder

Sets the content description associated with this element. This will be dictated when the element is focused by the screen reader.

While this field is statically accessible from 1.0, it's only bindable since version 1.2 and renderers supporting version 1.2 will use the dynamic value (if set).

setRole

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
fun setRole(role: Int): ModifiersBuilders.Semantics.Builder

Sets the type of user interface element. Accessibility services might use this to describe the element or do customizations.

setStateDescription

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
fun setStateDescription(stateDescription: TypeBuilders.StringProp): ModifiersBuilders.Semantics.Builder

Sets the localized state description of the semantics node. For example: "on" or "off". This will be dictated when the element is focused by the screen reader.

This field is bindable and will use the dynamic value (if set).