public final class

ModifiersBuilders.Semantics.Builder

extends java.lang.Object

 java.lang.Object

↳androidx.wear.protolayout.ModifiersBuilders.Semantics.Builder

Overview

Builder for ModifiersBuilders.Semantics

Summary

Constructors
publicBuilder()

Creates an instance of ModifiersBuilders.Clickable.Builder.

Methods
public ModifiersBuilders.Semanticsbuild()

Builds an instance from accumulated values.

public ModifiersBuilders.Semantics.BuildersetContentDescription(java.lang.String contentDescription)

Sets the content description associated with this element.

public ModifiersBuilders.Semantics.BuildersetContentDescription(TypeBuilders.StringProp contentDescription)

Sets the content description associated with this element.

public ModifiersBuilders.Semantics.BuildersetRole(int role)

Sets the type of user interface element.

public ModifiersBuilders.Semantics.BuildersetStateDescription(TypeBuilders.StringProp stateDescription)

Sets the localized state description of the semantics node.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public Builder()

Creates an instance of ModifiersBuilders.Clickable.Builder.

Methods

public ModifiersBuilders.Semantics.Builder setRole(int role)

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

public ModifiersBuilders.Semantics.Builder setStateDescription(TypeBuilders.StringProp stateDescription)

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).

public ModifiersBuilders.Semantics.Builder setContentDescription(java.lang.String contentDescription)

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

public ModifiersBuilders.Semantics.Builder setContentDescription(TypeBuilders.StringProp contentDescription)

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).

Builds an instance from accumulated values.