public final class

ModifiersBuilders.Semantics

extends java.lang.Object

 java.lang.Object

↳androidx.wear.protolayout.ModifiersBuilders.Semantics

Overview

A modifier for an element which has accessibility semantics associated with it. This should generally be used sparingly, and in most cases should only be applied to the top-level layout element or to Clickables.

Summary

Methods
public static ModifiersBuilders.SemanticsfromProto(ModifiersProto.Semantics proto, Fingerprint fingerprint)

Creates a new wrapper instance from the proto.

public TypeBuilders.StringPropgetContentDescription()

Gets the content description associated with this element.

public FingerprintgetFingerprint()

Get the fingerprint for this object, or null if unknown.

public intgetRole()

Gets the type of user interface element.

public TypeBuilders.StringPropgetStateDescription()

Gets the localized state description of the semantics node.

public ModifiersProto.SemanticstoProto()

Returns the internal proto instance.

public java.lang.StringtoString()

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

Methods

public TypeBuilders.StringProp getContentDescription()

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

public int getRole()

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

public TypeBuilders.StringProp getStateDescription()

Gets 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 Fingerprint getFingerprint()

Get the fingerprint for this object, or null if unknown.

public static ModifiersBuilders.Semantics fromProto(ModifiersProto.Semantics proto, Fingerprint fingerprint)

Creates a new wrapper instance from the proto.

public ModifiersProto.Semantics toProto()

Returns the internal proto instance.

public java.lang.String toString()