AccessibilityNodeInfoCompat.MathInfoCompat


class AccessibilityNodeInfoCompat.MathInfoCompat : AccessibilityNodeInfoCompat.StructuredDataInfoCompat


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

See also
AccessibilityNodeInfo.MathInfo

Compatibility:

  • API <: 36.1: Class methods perform no-op behavior.

Summary

Constants

const String!

An attribute used to associate a child element with one of the arguments in its parent's MATH_ATTRIBUTE_INTENT value.

const String!

An attribute that provides a semantic annotation for the element on which it is specified.

const String!

An element for creating fractions.

const String!

An element for symbolic names or arbitrary text to be rendered as an identifier.

const String!
MATH_TAG_MATH = "math"

The top-level root element that encapsulates a MathML expression.

const String!
MATH_TAG_MULTISCRIPTS = "mmultiscripts"

An element for attaching any number of prescripts and postscripts to a base expression.

const String!

Represents an empty element, often used as a placeholder in elements like mmultiscripts.

const String!

An element for a numeric literal.

const String!

An element for an operator, fence, separator, or accent.

const String!
MATH_TAG_OVER = "mover"

An element that attaches an accent or a limit over a base expression.

const String!

An empty element used within mmultiscripts to separate postscripts from prescripts.

const String!
MATH_TAG_ROOT = "mroot"

An element for radicals with an explicit index, such as a cube root.

const String!
MATH_TAG_ROW = "mrow"

An element for grouping sub-expressions horizontally.

const String!

An element for a square root.

const String!

An element for representing string literals, often for computer algebra systems.

const String!
MATH_TAG_SUB = "msub"

An element that attaches a subscript to a base expression.

const String!
MATH_TAG_SUB_SUP = "msubsup"

An element that attaches both a subscript and a superscript to a base expression.

const String!
MATH_TAG_SUP = "msup"

An element that attaches a superscript to a base expression.

const String!
MATH_TAG_TABLE = "mtable"

An element for creating tables or matrices.

const String!

An element representing a single cell in a table or matrix.

const String!

An element representing a single row in a a table or matrix.

const String!
MATH_TAG_TEXT = "mtext"

An element for arbitrary text to be rendered as itself, often used for commentary.

const String!
MATH_TAG_UNDER = "munder"

An element that attaches an accent or a limit under a base expression.

const String!
MATH_TAG_UNDER_OVER = "munderover"

An element that attaches scripts both under and over a base expression.

Public constructors

MathInfoCompat(mathInfo: MathInfo?)

Instantiates a new MathInfoCompat.

Instantiates a new MathInfoCompat.

Public functions

String?
getAttribute(attributeKey: String)

Gets the value of an attribute.

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

Adds an attribute.

Unit
removeAttribute(attributeKey: String)

Removes an attribute.

Constants

MATH_ATTRIBUTE_ARG

const val MATH_ATTRIBUTE_ARG = "arg": String!

An attribute used to associate a child element with one of the arguments in its parent's MATH_ATTRIBUTE_INTENT value.

The value of the arg attribute is a token that must match one of the argument names in the parent's intent value.

Use this attribute on a child node to explicitly link it to one of the argument placeholders in its parent's intent string. For example, if a parent node has intent="gcd($1, $2)", the child node representing the first parameter of the function should have its arg attribute set to "1".

MATH_ATTRIBUTE_INTENT

const val MATH_ATTRIBUTE_INTENT = "intent": String!

An attribute that provides a semantic annotation for the element on which it is specified.

The intent attribute's value is a string that can be parsed to determine the meaning of the element and its children. An intent value is a string consisting of a single token, or a function-like expression.

Use this attribute on a container node to disambiguate mathematical notation. For example, the expression (a, b) is ambiguous; it could be a point, an open interval, or the greatest common divisor. By setting intent="open-interval($1, $2)" on the parent node, you provide a precise, machine-readable meaning that accessibility services can use to provide a better experience. The $1 and $2 are placeholders for the arguments, which are identified on child nodes using the MATH_ATTRIBUTE_ARG attribute.

MATH_TAG_FRACTION

const val MATH_TAG_FRACTION = "mfrac": String!

An element for creating fractions.

MATH_TAG_IDENTIFIER

const val MATH_TAG_IDENTIFIER = "mi": String!

An element for symbolic names or arbitrary text to be rendered as an identifier.

MATH_TAG_MATH

const val MATH_TAG_MATH = "math": String!

The top-level root element that encapsulates a MathML expression.

MATH_TAG_MULTISCRIPTS

const val MATH_TAG_MULTISCRIPTS = "mmultiscripts": String!

An element for attaching any number of prescripts and postscripts to a base expression.

MATH_TAG_NONE_SCRIPT

const val MATH_TAG_NONE_SCRIPT = "none": String!

Represents an empty element, often used as a placeholder in elements like mmultiscripts.

MATH_TAG_NUMBER

const val MATH_TAG_NUMBER = "mn": String!

An element for a numeric literal.

MATH_TAG_OPERATOR

const val MATH_TAG_OPERATOR = "mo": String!

An element for an operator, fence, separator, or accent.

MATH_TAG_OVER

const val MATH_TAG_OVER = "mover": String!

An element that attaches an accent or a limit over a base expression.

MATH_TAG_PRESCRIPT_DELIMITER

const val MATH_TAG_PRESCRIPT_DELIMITER = "mprescripts": String!

An empty element used within mmultiscripts to separate postscripts from prescripts.

MATH_TAG_ROOT

const val MATH_TAG_ROOT = "mroot": String!

An element for radicals with an explicit index, such as a cube root.

MATH_TAG_ROW

const val MATH_TAG_ROW = "mrow": String!

An element for grouping sub-expressions horizontally.

MATH_TAG_SQUARE_ROOT

const val MATH_TAG_SQUARE_ROOT = "msqrt": String!

An element for a square root.

MATH_TAG_STRING_LITERAL

const val MATH_TAG_STRING_LITERAL = "ms": String!

An element for representing string literals, often for computer algebra systems.

MATH_TAG_SUB

const val MATH_TAG_SUB = "msub": String!

An element that attaches a subscript to a base expression.

MATH_TAG_SUB_SUP

const val MATH_TAG_SUB_SUP = "msubsup": String!

An element that attaches both a subscript and a superscript to a base expression.

MATH_TAG_SUP

const val MATH_TAG_SUP = "msup": String!

An element that attaches a superscript to a base expression.

MATH_TAG_TABLE

const val MATH_TAG_TABLE = "mtable": String!

An element for creating tables or matrices.

MATH_TAG_TABLE_CELL

const val MATH_TAG_TABLE_CELL = "mtd": String!

An element representing a single cell in a table or matrix.

MATH_TAG_TABLE_ROW

const val MATH_TAG_TABLE_ROW = "mtr": String!

An element representing a single row in a a table or matrix.

MATH_TAG_TEXT

const val MATH_TAG_TEXT = "mtext": String!

An element for arbitrary text to be rendered as itself, often used for commentary.

MATH_TAG_UNDER

const val MATH_TAG_UNDER = "munder": String!

An element that attaches an accent or a limit under a base expression.

MATH_TAG_UNDER_OVER

const val MATH_TAG_UNDER_OVER = "munderover": String!

An element that attaches scripts both under and over a base expression.

Public constructors

MathInfoCompat

MathInfoCompat(mathInfo: MathInfo?)

Instantiates a new MathInfoCompat.

Parameters
mathInfo: MathInfo?

The underlying MathInfo to wrap.

MathInfoCompat

MathInfoCompat(tag: String)

Instantiates a new MathInfoCompat.

Parameters
tag: String

The MathML tag for this node.

Public functions

getAttribute

fun getAttribute(attributeKey: String): String?

Gets the value of an attribute.

getTag

fun getTag(): String?

putAttribute

fun putAttribute(attributeKey: String, value: String): Unit

Adds an attribute.

removeAttribute

fun removeAttribute(attributeKey: String): Unit

Removes an attribute.