AccessibilityNodeInfoCompat.StructuredDataInfoCompat


abstract class AccessibilityNodeInfoCompat.StructuredDataInfoCompat

Known direct subclasses
AccessibilityNodeInfoCompat.MathInfoCompat

Compat class for AccessibilityNodeInfo.MathInfo, which is a class that holds information about a node that represents a mathematical expression.

AccessibilityNodeInfoCompat.PublicationInfoCompat

Holds information about a node that represents a part of a digital publication, such as a chapter, footnote, or glossary entry.


Compat class for AccessibilityNodeInfo.StructuredDataInfo, which is an abstract base class for holding structured semantic information about a node.

On API levels where the platform class corresponding to a subclass isn't available, setStructuredDataInfo stores the information in the node's extras instead. Accessibility services can read it from there with getStructuredDataInfo, but not with getStructuredDataInfo.

Summary

Protected constructors

Instantiates a new StructuredDataInfoCompat.

Public functions

Boolean
equals(obj: Any?)
String?
getAttribute(attributeKey: String)

Gets the value of an attribute.

(Mutable)Map<String!, String!>

Returns an unmodifiable map of attributes.

String?
Int
Unit
putAttribute(attributeKey: String, value: String)

Adds an attribute.

Unit
removeAttribute(attributeKey: String)

Removes an attribute.

String

Protected constructors

StructuredDataInfoCompat

Added in 1.19.0
protected StructuredDataInfoCompat(
    structuredDataInfo: AccessibilityNodeInfo.StructuredDataInfo?
)

Instantiates a new StructuredDataInfoCompat.

Parameters
structuredDataInfo: AccessibilityNodeInfo.StructuredDataInfo?

The underlying StructuredDataInfo to wrap.

Public functions

equals

fun equals(obj: Any?): Boolean

getAttribute

Added in 1.19.0
fun getAttribute(attributeKey: String): String?

Gets the value of an attribute.

Parameters
attributeKey: String

The attribute key.

Returns
String?

The attribute value.

getAttributes

Added in 1.19.0
fun getAttributes(): (Mutable)Map<String!, String!>

Returns an unmodifiable map of attributes.

Returns
(Mutable)Map<String!, String!>

An unmodifiable Map of attribute keys to values.

getTag

Added in 1.19.0
fun getTag(): String?
Returns
String?

The tag for this structured semantic information.

hashCode

fun hashCode(): Int

putAttribute

Added in 1.19.0
fun putAttribute(attributeKey: String, value: String): Unit

Adds an attribute.

Parameters
attributeKey: String

The attribute key.

value: String

The attribute value.

removeAttribute

Added in 1.19.0
fun removeAttribute(attributeKey: String): Unit

Removes an attribute.

Parameters
attributeKey: String

The attribute key.

toString

fun toString(): String