# AccessibilityNodeInfoCompat.MathInfoCompat

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java+class:androidx.core.view.accessibility.AccessibilityNodeInfoCompat.MathInfoCompat) Added in [1.19.1](https://developer.android.com/jetpack/androidx/releases/core#1.19.1)

*** ** * ** ***


```
public class AccessibilityNodeInfoCompat.MathInfoCompat extends AccessibilityNodeInfoCompat.StructuredDataInfoCompat
```

<br />

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) |||
| ↳ | [androidx.core.view.accessibility.AccessibilityNodeInfoCompat.StructuredDataInfoCompat](https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.StructuredDataInfoCompat) ||
|   | ↳ | [androidx.core.view.accessibility.AccessibilityNodeInfoCompat.MathInfoCompat](https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.MathInfoCompat) |

*** ** * ** ***

Compat class for `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.MathInfo.html`, which is a class that holds information about a node that represents a mathematical expression.

| See also |
|---|---|
| `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.MathInfo.html` | Compatibility: - API \<: 36.1: Class methods perform no-op behavior. |

## Summary

| ### Constants |
|---|---|
| `static final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.MathInfoCompat#MATH_ATTRIBUTE_ARG() = "arg"` An attribute used to associate a child element with one of the arguments in its parent's `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.MathInfoCompat#MATH_ATTRIBUTE_INTENT()` value. |
| `static final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.MathInfoCompat#MATH_ATTRIBUTE_INTENT() = "intent"` An attribute that provides a semantic annotation for the element on which it is specified. |
| `static final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.MathInfoCompat#MATH_TAG_FRACTION() = "mfrac"` An element for creating fractions. |
| `static final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.MathInfoCompat#MATH_TAG_IDENTIFIER() = "mi"` An element for symbolic names or arbitrary text to be rendered as an identifier. |
| `static final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.MathInfoCompat#MATH_TAG_MATH() = "math"` The top-level root element that encapsulates a MathML expression. |
| `static final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.MathInfoCompat#MATH_TAG_MULTISCRIPTS() = "mmultiscripts"` An element for attaching any number of prescripts and postscripts to a base expression. |
| `static final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.MathInfoCompat#MATH_TAG_NONE_SCRIPT() = "none"` Represents an empty element, often used as a placeholder in elements like `mmultiscripts`. |
| `static final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.MathInfoCompat#MATH_TAG_NUMBER() = "mn"` An element for a numeric literal. |
| `static final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.MathInfoCompat#MATH_TAG_OPERATOR() = "mo"` An element for an operator, fence, separator, or accent. |
| `static final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.MathInfoCompat#MATH_TAG_OVER() = "mover"` An element that attaches an accent or a limit over a base expression. |
| `static final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.MathInfoCompat#MATH_TAG_PRESCRIPT_DELIMITER() = "mprescripts"` An empty element used within `mmultiscripts` to separate postscripts from prescripts. |
| `static final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.MathInfoCompat#MATH_TAG_ROOT() = "mroot"` An element for radicals with an explicit index, such as a cube root. |
| `static final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.MathInfoCompat#MATH_TAG_ROW() = "mrow"` An element for grouping sub-expressions horizontally. |
| `static final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.MathInfoCompat#MATH_TAG_SQUARE_ROOT() = "msqrt"` An element for a square root. |
| `static final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.MathInfoCompat#MATH_TAG_STRING_LITERAL() = "ms"` An element for representing string literals, often for computer algebra systems. |
| `static final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.MathInfoCompat#MATH_TAG_SUB() = "msub"` An element that attaches a subscript to a base expression. |
| `static final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.MathInfoCompat#MATH_TAG_SUB_SUP() = "msubsup"` An element that attaches both a subscript and a superscript to a base expression. |
| `static final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.MathInfoCompat#MATH_TAG_SUP() = "msup"` An element that attaches a superscript to a base expression. |
| `static final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.MathInfoCompat#MATH_TAG_TABLE() = "mtable"` An element for creating tables or matrices. |
| `static final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.MathInfoCompat#MATH_TAG_TABLE_CELL() = "mtd"` An element representing a single cell in a table or matrix. |
| `static final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.MathInfoCompat#MATH_TAG_TABLE_ROW() = "mtr"` An element representing a single row in a a table or matrix. |
| `static final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.MathInfoCompat#MATH_TAG_TEXT() = "mtext"` An element for arbitrary text to be rendered as itself, often used for commentary. |
| `static final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.MathInfoCompat#MATH_TAG_UNDER() = "munder"` An element that attaches an accent or a limit under a base expression. |
| `static final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.MathInfoCompat#MATH_TAG_UNDER_OVER() = "munderover"` An element that attaches scripts both under and over a base expression. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.MathInfoCompat#MathInfoCompat(android.view.accessibility.AccessibilityNodeInfo.MathInfo)(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.MathInfo.html mathInfo)` Instantiates a new MathInfoCompat. |
| `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.MathInfoCompat#MathInfoCompat(java.lang.String)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html tag)` Instantiates a new MathInfoCompat. |

| ### Public methods |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.MathInfoCompat#getAttribute(java.lang.String)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html attributeKey)` Gets the value of an attribute. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.MathInfoCompat#getTag()()` |
| `void` | `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.MathInfoCompat#putAttribute(java.lang.String,java.lang.String)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html attributeKey, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html value)` Adds an attribute. |
| `void` | `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.MathInfoCompat#removeAttribute(java.lang.String)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html attributeKey)` Removes an attribute. |

### Inherited methods

From [androidx.core.view.accessibility.AccessibilityNodeInfoCompat.StructuredDataInfoCompat](https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.StructuredDataInfoCompat) `boolean` `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.StructuredDataInfoCompat#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object.html obj)`

Compatibility:
`@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/util/Map.html<https://developer.android.com/reference/java/lang/String.html, https://developer.android.com/reference/java/lang/String.html>` `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.StructuredDataInfoCompat#getAttributes()()` `int` `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.StructuredDataInfoCompat#hashCode()()`

Compatibility:

## Constants

### MATH_ATTRIBUTE_ARG

Added in [1.19.1](https://developer.android.com/jetpack/androidx/releases/core#1.19.1)

```
public static final String MATH_ATTRIBUTE_ARG = "arg"
```

An attribute used to associate a child element with one of the arguments in its parent's `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.MathInfoCompat#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

Added in [1.19.1](https://developer.android.com/jetpack/androidx/releases/core#1.19.1)

```
public static final String MATH_ATTRIBUTE_INTENT = "intent"
```

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 `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.MathInfoCompat#MATH_ATTRIBUTE_ARG()` attribute.

### MATH_TAG_FRACTION

Added in [1.19.1](https://developer.android.com/jetpack/androidx/releases/core#1.19.1)

```
public static final String MATH_TAG_FRACTION = "mfrac"
```

An element for creating fractions.

### MATH_TAG_IDENTIFIER

Added in [1.19.1](https://developer.android.com/jetpack/androidx/releases/core#1.19.1)

```
public static final String MATH_TAG_IDENTIFIER = "mi"
```

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

### MATH_TAG_MATH

Added in [1.19.1](https://developer.android.com/jetpack/androidx/releases/core#1.19.1)

```
public static final String MATH_TAG_MATH = "math"
```

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

### MATH_TAG_MULTISCRIPTS

Added in [1.19.1](https://developer.android.com/jetpack/androidx/releases/core#1.19.1)

```
public static final String MATH_TAG_MULTISCRIPTS = "mmultiscripts"
```

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

### MATH_TAG_NONE_SCRIPT

Added in [1.19.1](https://developer.android.com/jetpack/androidx/releases/core#1.19.1)

```
public static final String MATH_TAG_NONE_SCRIPT = "none"
```

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

### MATH_TAG_NUMBER

Added in [1.19.1](https://developer.android.com/jetpack/androidx/releases/core#1.19.1)

```
public static final String MATH_TAG_NUMBER = "mn"
```

An element for a numeric literal.

### MATH_TAG_OPERATOR

Added in [1.19.1](https://developer.android.com/jetpack/androidx/releases/core#1.19.1)

```
public static final String MATH_TAG_OPERATOR = "mo"
```

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

### MATH_TAG_OVER

Added in [1.19.1](https://developer.android.com/jetpack/androidx/releases/core#1.19.1)

```
public static final String MATH_TAG_OVER = "mover"
```

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

### MATH_TAG_PRESCRIPT_DELIMITER

Added in [1.19.1](https://developer.android.com/jetpack/androidx/releases/core#1.19.1)

```
public static final String MATH_TAG_PRESCRIPT_DELIMITER = "mprescripts"
```

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

### MATH_TAG_ROOT

Added in [1.19.1](https://developer.android.com/jetpack/androidx/releases/core#1.19.1)

```
public static final String MATH_TAG_ROOT = "mroot"
```

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

### MATH_TAG_ROW

Added in [1.19.1](https://developer.android.com/jetpack/androidx/releases/core#1.19.1)

```
public static final String MATH_TAG_ROW = "mrow"
```

An element for grouping sub-expressions horizontally.

### MATH_TAG_SQUARE_ROOT

Added in [1.19.1](https://developer.android.com/jetpack/androidx/releases/core#1.19.1)

```
public static final String MATH_TAG_SQUARE_ROOT = "msqrt"
```

An element for a square root.

### MATH_TAG_STRING_LITERAL

Added in [1.19.1](https://developer.android.com/jetpack/androidx/releases/core#1.19.1)

```
public static final String MATH_TAG_STRING_LITERAL = "ms"
```

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

### MATH_TAG_SUB

Added in [1.19.1](https://developer.android.com/jetpack/androidx/releases/core#1.19.1)

```
public static final String MATH_TAG_SUB = "msub"
```

An element that attaches a subscript to a base expression.

### MATH_TAG_SUB_SUP

Added in [1.19.1](https://developer.android.com/jetpack/androidx/releases/core#1.19.1)

```
public static final String MATH_TAG_SUB_SUP = "msubsup"
```

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

### MATH_TAG_SUP

Added in [1.19.1](https://developer.android.com/jetpack/androidx/releases/core#1.19.1)

```
public static final String MATH_TAG_SUP = "msup"
```

An element that attaches a superscript to a base expression.

### MATH_TAG_TABLE

Added in [1.19.1](https://developer.android.com/jetpack/androidx/releases/core#1.19.1)

```
public static final String MATH_TAG_TABLE = "mtable"
```

An element for creating tables or matrices.

### MATH_TAG_TABLE_CELL

Added in [1.19.1](https://developer.android.com/jetpack/androidx/releases/core#1.19.1)

```
public static final String MATH_TAG_TABLE_CELL = "mtd"
```

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

### MATH_TAG_TABLE_ROW

Added in [1.19.1](https://developer.android.com/jetpack/androidx/releases/core#1.19.1)

```
public static final String MATH_TAG_TABLE_ROW = "mtr"
```

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

### MATH_TAG_TEXT

Added in [1.19.1](https://developer.android.com/jetpack/androidx/releases/core#1.19.1)

```
public static final String MATH_TAG_TEXT = "mtext"
```

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

### MATH_TAG_UNDER

Added in [1.19.1](https://developer.android.com/jetpack/androidx/releases/core#1.19.1)

```
public static final String MATH_TAG_UNDER = "munder"
```

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

### MATH_TAG_UNDER_OVER

Added in [1.19.1](https://developer.android.com/jetpack/androidx/releases/core#1.19.1)

```
public static final String MATH_TAG_UNDER_OVER = "munderover"
```

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

## Public constructors

### MathInfoCompat

Added in [1.19.1](https://developer.android.com/jetpack/androidx/releases/core#1.19.1)

```
public MathInfoCompat(@Nullable AccessibilityNodeInfo.MathInfo mathInfo)
```

Instantiates a new MathInfoCompat.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.MathInfo.html mathInfo` | The underlying MathInfo to wrap. |

### MathInfoCompat

Added in [1.19.1](https://developer.android.com/jetpack/androidx/releases/core#1.19.1)

```
public MathInfoCompat(@NonNull String tag)
```

Instantiates a new MathInfoCompat.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html tag` | The MathML tag for this node. |

## Public methods

### getAttribute

```
public @Nullable String getAttribute(@NonNull String attributeKey)
```

Gets the value of an attribute.

### getTag

```
public @Nullable String getTag()
```

### putAttribute

```
public void putAttribute(@NonNull String attributeKey, @NonNull String value)
```

Adds an attribute.

### removeAttribute

```
public void removeAttribute(@NonNull String attributeKey)
```

Removes an attribute.