Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Constants](https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#constants) \| [Methods](https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#inhmethods)

# AssistStructure.ViewNode

*** ** * ** ***


`
public
static


class
AssistStructure.ViewNode
`


`

extends https://developer.android.com/reference/java/lang/Object


`

`


`

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.app.assist.AssistStructure.ViewNode |

<br />

*** ** * ** ***

Describes a single view in the assist data.

## Summary

| ### Constants ||
|---|---|
| `int` | `https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#TEXT_COLOR_UNDEFINED` Magic value for text color that has not been defined, which is very unlikely to be confused with a real text color. |
| `int` | `https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#TEXT_STYLE_BOLD` |
| `int` | `https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#TEXT_STYLE_ITALIC` |
| `int` | `https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#TEXT_STYLE_STRIKE_THRU` |
| `int` | `https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#TEXT_STYLE_UNDERLINE` |

| ### Public methods ||
|---|---|
| ` float` | ` https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getAlpha()() ` Returns the alpha transformation of the view, used to reduce the overall opacity of the view's contents, as set by `https://developer.android.com/reference/android/view/ViewStructure#setAlpha(float)`. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getAutofillHints()() ` Describes the content of a view so that a autofill service can fill in the appropriate data. |
| ` https://developer.android.com/reference/android/view/autofill/AutofillId` | ` https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getAutofillId()() ` Gets the id that can be used to autofill the view contents. |
| ` https://developer.android.com/reference/android/view/autofill/AutofillNoiseInjectedData` | ` https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getAutofillNoiseInjectedData()() ` Gets the payload of noise-injected version text of this ViewNode. |
| ` https://developer.android.com/reference/java/lang/CharSequence` | ` https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getAutofillOptions()() ` Gets the options that can be used to autofill this view. |
| ` int` | ` https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getAutofillType()() ` Gets the type of value that can be used to autofill the view contents. |
| ` https://developer.android.com/reference/android/view/autofill/AutofillValue` | ` https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getAutofillValue()() ` Gets the value of this view. |
| ` https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode` | ` https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getChildAt(int)(int index) ` Return a child of this node, given an index value from 0 to `https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getChildCount()`-1. |
| ` int` | ` https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getChildCount()() ` Return the number of children this node has. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getClassName()() ` Returns the class name of the node's implementation, indicating its behavior. |
| ` https://developer.android.com/reference/java/lang/CharSequence` | ` https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getContentDescription()() ` Returns any content description associated with the node, which semantically describes its purpose for accessibility and other uses. |
| ` float` | ` https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getElevation()() ` Returns the visual elevation of the view, used for shadowing and other visual characterstics, as set by `https://developer.android.com/reference/android/view/ViewStructure#setElevation(float)`. |
| ` https://developer.android.com/reference/android/os/Bundle` | ` https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getExtras()() ` Return a Bundle containing optional vendor-specific extension information. |
| ` int` | ` https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getHeight()() ` Returns the height of this view, in pixels. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getHint()() ` Return additional hint text associated with the node; this is typically used with a node that takes user input, describing to the user what the input means. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getHintIdEntry()() ` Gets the identifier used to set the hint associated with this view. |
| ` https://developer.android.com/reference/android/view/ViewStructure.HtmlInfo` | ` https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getHtmlInfo()() ` Returns the HTML properties associated with this view. |
| ` int` | ` https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getId()() ` Returns the ID associated with this view, as per `https://developer.android.com/reference/android/view/View#getId()`. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getIdEntry()() ` If `https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getId()` is a resource identifier, this is the entry name of that identifier. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getIdPackage()() ` If `https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getId()` is a resource identifier, this is the package name of that identifier. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getIdType()() ` If `https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getId()` is a resource identifier, this is the type name of that identifier. |
| ` int` | ` https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getImportantForAutofill()() ` Gets the `https://developer.android.com/reference/android/view/View#setImportantForAutofill(int)` of the view associated with this node. |
| ` int` | ` https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getInputType()() ` Gets the `https://developer.android.com/reference/android/text/InputType` bits of this structure. |
| ` int` | ` https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getLeft()() ` Returns the left edge of this view, in pixels, relative to the left edge of its parent. |
| ` https://developer.android.com/reference/android/os/LocaleList` | ` https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getLocaleList()() ` Returns the list of locales associated with this view. |
| ` int` | ` https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getMaxTextEms()() ` Returns the maximum width in ems of the text associated with this node, or `-1` if not supported by the node. |
| ` int` | ` https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getMaxTextLength()() ` Returns the maximum length of the text associated with this node, or `-1` if not supported by the node or not set. |
| ` int` | ` https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getMinTextEms()() ` Returns the minimum width in ems of the text associated with this node, or `-1` if not supported by the node. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getReceiveContentMimeTypes()() ` Returns the MIME types accepted by `https://developer.android.com/reference/android/view/View#performReceiveContent(android.view.ContentInfo)` for this view. |
| ` int` | ` https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getScrollX()() ` Returns the current X scroll offset of this view, as per `https://developer.android.com/reference/android/view/View#getScrollX()`. |
| ` int` | ` https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getScrollY()() ` Returns the current Y scroll offset of this view, as per `https://developer.android.com/reference/android/view/View#getScrollX()`. |
| ` https://developer.android.com/reference/java/lang/CharSequence` | ` https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getText()() ` Returns any text associated with the node that is displayed to the user, or null if there is none. |
| ` int` | ` https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getTextBackgroundColor()() ` If `https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getText()` is non-null, this is the main text background color associated with it. |
| ` int` | ` https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getTextColor()() ` If `https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getText()` is non-null, this is the main text color associated with it. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getTextIdEntry()() ` Gets the identifier used to set the text associated with this view. |
| ` int[]` | ` https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getTextLineBaselines()() ` Return per-line baselines into the text returned by `https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getText()`. |
| ` int[]` | ` https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getTextLineCharOffsets()() ` Return per-line offsets into the text returned by `https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getText()`. |
| ` int` | ` https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getTextSelectionEnd()() ` If `https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getText()` is non-null, this is where the current selection starts. |
| ` int` | ` https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getTextSelectionStart()() ` If `https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getText()` is non-null, this is where the current selection starts. |
| ` float` | ` https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getTextSize()() ` If `https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getText()` is non-null, this is the main text size (in pixels) associated with it. |
| ` int` | ` https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getTextStyle()() ` If `https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getText()` is non-null, this is the main text style associated with it, containing a bit mask of `https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#TEXT_STYLE_BOLD`, `https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#TEXT_STYLE_BOLD`, `https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#TEXT_STYLE_STRIKE_THRU`, and/or `https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#TEXT_STYLE_UNDERLINE`. |
| ` int` | ` https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getTop()() ` Returns the top edge of this view, in pixels, relative to the top edge of its parent. |
| ` https://developer.android.com/reference/android/graphics/Matrix` | ` https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getTransformation()() ` Returns the transformation that has been applied to this view, such as a translation or scaling. |
| ` int` | ` https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getVisibility()() ` Returns the visibility mode of this view, as per `https://developer.android.com/reference/android/view/View#getVisibility()`. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getWebDomain()() ` Returns the domain of the HTML document represented by this view. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getWebScheme()() ` Returns the scheme of the HTML document represented by this view. |
| ` int` | ` https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getWidth()() ` Returns the width of this view, in pixels. |
| ` boolean` | ` https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#isAccessibilityFocused()() ` Returns true if this node currently had accessibility focus at the time that the structure was collected. |
| ` boolean` | ` https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#isActivated()() ` Returns true if this node has currently been activated by the user. |
| ` boolean` | ` https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#isAssistBlocked()() ` Returns true if assist data has been blocked starting at this node in the hierarchy. |
| ` boolean` | ` https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#isCheckable()() ` Returns true if this node represents something that is checkable by the user. |
| ` boolean` | ` https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#isChecked()() ` Returns true if this node is currently in a checked state. |
| ` boolean` | ` https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#isClickable()() ` Returns true if this node is clickable by the user. |
| ` boolean` | ` https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#isContextClickable()() ` Returns true if this node is something the user can perform a context click on. |
| ` boolean` | ` https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#isEnabled()() ` Returns true if this node is in an enabled state. |
| ` boolean` | ` https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#isFocusable()() ` Returns true if this node can take input focus. |
| ` boolean` | ` https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#isFocused()() ` Returns true if this node currently had input focus at the time that the structure was collected. |
| ` boolean` | ` https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#isLongClickable()() ` Returns true if this node is something the user can perform a long click/press on. |
| ` boolean` | ` https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#isOpaque()() ` Returns true if this node is opaque. |
| ` boolean` | ` https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#isSelected()() ` Returns true if this node has currently been selected by the user. |

| ### Inherited methods |
|---|---|
| From class ` https://developer.android.com/reference/java/lang/Object ` |---|---| | ` https://developer.android.com/reference/java/lang/Object` | ` https://developer.android.com/reference/java/lang/Object#clone()() ` Creates and returns a copy of this object. | | ` boolean` | ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) ` Indicates whether some other object is "equal to" this one. | | ` void` | ` https://developer.android.com/reference/java/lang/Object#finalize()() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. | | ` final https://developer.android.com/reference/java/lang/Class<?>` | ` https://developer.android.com/reference/java/lang/Object#getClass()() ` Returns the runtime class of this `Object`. | | ` int` | ` https://developer.android.com/reference/java/lang/Object#hashCode()() ` Returns a hash code value for the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notify()() ` Wakes up a single thread that is waiting on this object's monitor. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notifyAll()() ` Wakes up all threads that are waiting on this object's monitor. | | ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/java/lang/Object#toString()() ` Returns a string representation of the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait()() ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*. | ||

## Constants

### TEXT_COLOR_UNDEFINED

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int TEXT_COLOR_UNDEFINED
```

Magic value for text color that has not been defined, which is very unlikely
to be confused with a real text color.

<br />

Constant Value:

1
(0x00000001)


### TEXT_STYLE_BOLD

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int TEXT_STYLE_BOLD
```

<br />

<br />

Constant Value:

1
(0x00000001)


### TEXT_STYLE_ITALIC

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int TEXT_STYLE_ITALIC
```

<br />

<br />

Constant Value:

2
(0x00000002)


### TEXT_STYLE_STRIKE_THRU

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int TEXT_STYLE_STRIKE_THRU
```

<br />

<br />

Constant Value:

8
(0x00000008)


### TEXT_STYLE_UNDERLINE

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int TEXT_STYLE_UNDERLINE
```

<br />

<br />

Constant Value:

4
(0x00000004)


## Public methods

### getAlpha

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public float getAlpha ()
```

Returns the alpha transformation of the view, used to reduce the overall opacity
of the view's contents, as set by `https://developer.android.com/reference/android/view/ViewStructure#setAlpha(float)`.

It's only relevant when the `https://developer.android.com/reference/android/app/assist/AssistStructure` is used for assist purposes,
not for autofill purposes.

<br />

| Returns ||
|---|---|
| `float` | <br /> |

### getAutofillHints

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String[] getAutofillHints ()
```

Describes the content of a view so that a autofill service can fill in the appropriate
data.

It's only relevant when the `https://developer.android.com/reference/android/app/assist/AssistStructure` is used for autofill purposes,
not for Assist - see `https://developer.android.com/reference/android/view/View#getAutofillHints()` for more info.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | The autofill hints for this view, or `null` if the structure was created for assist purposes. <br /> |

### getAutofillId

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public AutofillId getAutofillId ()
```

Gets the id that can be used to autofill the view contents.

It's only relevant when the `https://developer.android.com/reference/android/app/assist/AssistStructure` is used for autofill purposes.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/autofill/AutofillId` | id that can be used to autofill the view contents, or `null` if the structure was created for assist purposes. <br /> |

### getAutofillNoiseInjectedData

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public AutofillNoiseInjectedData getAutofillNoiseInjectedData ()
```

Gets the payload of noise-injected version text of this ViewNode. The
payload is only returned when the current ViewNode's text is sensitive and
stripped from the AssistStructure(i.e. `https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getText()` returns empty
string). See the doc for `https://developer.android.com/reference/android/view/autofill/AutofillNoiseInjectedData` about the details
of the noise-injection algorithm and suggestions on how to rebuild the
non-private parts of the text at server side.

It's only relevant when the `https://developer.android.com/reference/android/app/assist/AssistStructure` is used for autofill
purpose, not for assist purposes.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/autofill/AutofillNoiseInjectedData` | the noise-injected text payload, or `null` if the structure was created for assist purposes or if the ViewNode does not have text eligible for providing a noise-injected version. <br /> |

### getAutofillOptions

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public CharSequence[] getAutofillOptions ()
```

Gets the options that can be used to autofill this view.

Typically used by nodes whose `https://developer.android.com/reference/android/view/View#getAutofillType()` is a list to indicate
the meaning of each possible value in the list.

It's relevant when the `https://developer.android.com/reference/android/app/assist/AssistStructure` is used for autofill purposes, not
for assist purposes.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/CharSequence` | the options that can be used to autofill this view, or `null` if the structure was created for assist purposes. <br /> |

### getAutofillType

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getAutofillType ()
```

Gets the type of value that can be used to autofill the view contents.

It's only relevant when the `https://developer.android.com/reference/android/app/assist/AssistStructure` is used for autofill purposes.

<br />

| Returns ||
|---|---|
| `int` | autofill type as defined by `https://developer.android.com/reference/android/view/View#getAutofillType()`, or `https://developer.android.com/reference/android/view/View#AUTOFILL_TYPE_NONE` if the structure was created for assist purposes. Value is one of the following: - `https://developer.android.com/reference/android/view/View#AUTOFILL_TYPE_NONE` - `https://developer.android.com/reference/android/view/View#AUTOFILL_TYPE_TEXT` - `https://developer.android.com/reference/android/view/View#AUTOFILL_TYPE_TOGGLE` - `https://developer.android.com/reference/android/view/View#AUTOFILL_TYPE_LIST` - `https://developer.android.com/reference/android/view/View#AUTOFILL_TYPE_DATE` |

### getAutofillValue

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public AutofillValue getAutofillValue ()
```

Gets the value of this view.

It's only relevant when the `https://developer.android.com/reference/android/app/assist/AssistStructure` is used for autofill purposes,
not for assist purposes.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/autofill/AutofillValue` | the autofill value of this view, or `null` if the structure was created for assist purposes. <br /> |

### getChildAt

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public AssistStructure.ViewNode getChildAt (int index)
```

Return a child of this node, given an index value from 0 to
`https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getChildCount()`-1.

<br />

| Parameters ||
|---|---|
| `index` | `int` <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode` | <br /> |

### getChildCount

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getChildCount ()
```

Return the number of children this node has.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### getClassName

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String getClassName ()
```

Returns the class name of the node's implementation, indicating its behavior.
For example, a button will report "android.widget.Button" meaning it behaves
like a `https://developer.android.com/reference/android/widget/Button`.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | This value may be `null`. <br /> |

### getContentDescription

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public CharSequence getContentDescription ()
```

Returns any content description associated with the node, which semantically describes
its purpose for accessibility and other uses.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/CharSequence` | This value may be `null`. <br /> |

### getElevation

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public float getElevation ()
```

Returns the visual elevation of the view, used for shadowing and other visual
characterstics, as set by `https://developer.android.com/reference/android/view/ViewStructure#setElevation(float)`.

It's only relevant when the `https://developer.android.com/reference/android/app/assist/AssistStructure` is used for assist purposes,
not for autofill purposes.

<br />

| Returns ||
|---|---|
| `float` | <br /> |

### getExtras

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Bundle getExtras ()
```

Return a Bundle containing optional vendor-specific extension information.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/os/Bundle` | This value may be `null`. <br /> |

### getHeight

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getHeight ()
```

Returns the height of this view, in pixels.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### getHint

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String getHint ()
```

Return additional hint text associated with the node; this is typically used with
a node that takes user input, describing to the user what the input means.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | This value may be `null`. <br /> |

### getHintIdEntry

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String getHintIdEntry ()
```

Gets the identifier used to set the hint associated with this view.

It's only relevant when the `https://developer.android.com/reference/android/app/assist/AssistStructure` is used for autofill purposes,
not for assist purposes.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | This value may be `null`. <br /> |

### getHtmlInfo

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public ViewStructure.HtmlInfo getHtmlInfo ()
```

Returns the HTML properties associated with this view.

It's only relevant when the `https://developer.android.com/reference/android/app/assist/AssistStructure` is used for autofill purposes,
not for assist purposes.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/ViewStructure.HtmlInfo` | the HTML properties associated with this view, or `null` if the structure was created for assist purposes. <br /> |

### getId

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getId ()
```

Returns the ID associated with this view, as per `https://developer.android.com/reference/android/view/View#getId()`.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### getIdEntry

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String getIdEntry ()
```

If `https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getId()` is a resource identifier, this is the entry name of that
identifier. See `https://developer.android.com/reference/android/view/ViewStructure#setId(int,%20java.lang.String,%20java.lang.String,%20java.lang.String)`
for more information.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | This value may be `null`. <br /> |

### getIdPackage

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String getIdPackage ()
```

If `https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getId()` is a resource identifier, this is the package name of that
identifier. See `https://developer.android.com/reference/android/view/ViewStructure#setId(int,%20java.lang.String,%20java.lang.String,%20java.lang.String)`
for more information.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | This value may be `null`. <br /> |

### getIdType

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String getIdType ()
```

If `https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getId()` is a resource identifier, this is the type name of that
identifier. See `https://developer.android.com/reference/android/view/ViewStructure#setId(int,%20java.lang.String,%20java.lang.String,%20java.lang.String)`
for more information.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | This value may be `null`. <br /> |

### getImportantForAutofill

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getImportantForAutofill ()
```

Gets the `https://developer.android.com/reference/android/view/View#setImportantForAutofill(int)` of
the view associated with this node.

It's only relevant when the `https://developer.android.com/reference/android/app/assist/AssistStructure` is used for autofill purposes.

<br />

| Returns ||
|---|---|
| `int` | Value is one of the following: - `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_AUTOFILL_AUTO` - `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_AUTOFILL_YES` - `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_AUTOFILL_NO` - `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_AUTOFILL_YES_EXCLUDE_DESCENDANTS` - `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_AUTOFILL_NO_EXCLUDE_DESCENDANTS` |

### getInputType

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getInputType ()
```

Gets the `https://developer.android.com/reference/android/text/InputType` bits of this structure.

<br />

| Returns ||
|---|---|
| `int` | bits as defined by `https://developer.android.com/reference/android/text/InputType`. <br /> |

### getLeft

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getLeft ()
```

Returns the left edge of this view, in pixels, relative to the left edge of its parent.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### getLocaleList

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public LocaleList getLocaleList ()
```

Returns the list of locales associated with this view.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/os/LocaleList` | This value may be `null`. <br /> |

### getMaxTextEms

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getMaxTextEms ()
```

Returns the maximum width in ems of the text associated with this node, or `-1`
if not supported by the node.

It's only relevant when the `https://developer.android.com/reference/android/app/assist/AssistStructure` is used for autofill purposes,
not for assist purposes.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### getMaxTextLength

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getMaxTextLength ()
```

Returns the maximum length of the text associated with this node, or `-1` if not
supported by the node or not set. System may set a default value if the text length is
not set.

It's only relevant when the `https://developer.android.com/reference/android/app/assist/AssistStructure` is used for autofill purposes,
not for assist purposes.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### getMinTextEms

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getMinTextEms ()
```

Returns the minimum width in ems of the text associated with this node, or `-1`
if not supported by the node.

It's only relevant when the `https://developer.android.com/reference/android/app/assist/AssistStructure` is used for autofill purposes,
not for assist purposes.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### getReceiveContentMimeTypes

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String[] getReceiveContentMimeTypes ()
```

Returns the MIME types accepted by `https://developer.android.com/reference/android/view/View#performReceiveContent(android.view.ContentInfo)` for this view. See
`https://developer.android.com/reference/android/view/View#getReceiveContentMimeTypes()` for details.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | This value may be `null`. <br /> |

### getScrollX

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getScrollX ()
```

Returns the current X scroll offset of this view, as per
`https://developer.android.com/reference/android/view/View#getScrollX()`.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### getScrollY

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getScrollY ()
```

Returns the current Y scroll offset of this view, as per
`https://developer.android.com/reference/android/view/View#getScrollX()`.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### getText

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public CharSequence getText ()
```

Returns any text associated with the node that is displayed to the user, or null
if there is none.

The text will be stripped of any spans that could potentially contain reference to
the activity context, to avoid memory leak. If the text contained a span, a plain
string version of the text will be returned.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/CharSequence` | <br /> |

### getTextBackgroundColor

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getTextBackgroundColor ()
```

If `https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getText()` is non-null, this is the main text background color associated
with it.
If there is no text background color, `https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#TEXT_COLOR_UNDEFINED` is returned.
Note that the text may also contain style spans that modify the color of specific
parts of the text.

It's only relevant when the `https://developer.android.com/reference/android/app/assist/AssistStructure` is used for assist purposes,
not for autofill purposes.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### getTextColor

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getTextColor ()
```

If `https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getText()` is non-null, this is the main text color associated with it.
If there is no text color, `https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#TEXT_COLOR_UNDEFINED` is returned.
Note that the text may also contain style spans that modify the color of specific
parts of the text.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### getTextIdEntry

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String getTextIdEntry ()
```

Gets the identifier used to set the text associated with this view.

It's only relevant when the `https://developer.android.com/reference/android/app/assist/AssistStructure` is used for autofill purposes,
not for assist purposes.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | This value may be `null`. <br /> |

### getTextLineBaselines

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int[] getTextLineBaselines ()
```

Return per-line baselines into the text returned by `https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getText()`. Each entry
in the array is a formatted line of text, and the value it contains is the baseline
where that text appears in the view. May return null if there is no line
information.

It's only relevant when the `https://developer.android.com/reference/android/app/assist/AssistStructure` is used for assist purposes,
not for autofill purposes.

<br />

| Returns ||
|---|---|
| `int[]` | <br /> |

### getTextLineCharOffsets

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int[] getTextLineCharOffsets ()
```

Return per-line offsets into the text returned by `https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getText()`. Each entry
in the array is a formatted line of text, and the value it contains is the offset
into the text string where that line starts. May return null if there is no line
information.

It's only relevant when the `https://developer.android.com/reference/android/app/assist/AssistStructure` is used for assist purposes,
not for autofill purposes.

<br />

| Returns ||
|---|---|
| `int[]` | <br /> |

### getTextSelectionEnd

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getTextSelectionEnd ()
```

If `https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getText()` is non-null, this is where the current selection starts.
If there is no selection, returns the same value as `https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getTextSelectionStart()`,
indicating the cursor position.

It's only relevant when the `https://developer.android.com/reference/android/app/assist/AssistStructure` is used for assist purposes,
not for autofill purposes.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### getTextSelectionStart

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getTextSelectionStart ()
```

If `https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getText()` is non-null, this is where the current selection starts.

It's only relevant when the `https://developer.android.com/reference/android/app/assist/AssistStructure` is used for assist purposes,
not for autofill purposes.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### getTextSize

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public float getTextSize ()
```

If `https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getText()` is non-null, this is the main text size (in pixels) associated
with it.
Note that the text may also contain style spans that modify the size of specific
parts of the text.

It's only relevant when the `https://developer.android.com/reference/android/app/assist/AssistStructure` is used for assist purposes,
not for autofill purposes.

<br />

| Returns ||
|---|---|
| `float` | <br /> |

### getTextStyle

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getTextStyle ()
```

If `https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getText()` is non-null, this is the main text style associated
with it, containing a bit mask of `https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#TEXT_STYLE_BOLD`,
`https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#TEXT_STYLE_BOLD`, `https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#TEXT_STYLE_STRIKE_THRU`, and/or
`https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#TEXT_STYLE_UNDERLINE`.
Note that the text may also contain style spans that modify the style of specific
parts of the text.

It's only relevant when the `https://developer.android.com/reference/android/app/assist/AssistStructure` is used for assist purposes,
not for autofill purposes.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### getTop

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getTop ()
```

Returns the top edge of this view, in pixels, relative to the top edge of its parent.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### getTransformation

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Matrix getTransformation ()
```

Returns the transformation that has been applied to this view, such as a translation
or scaling. The returned Matrix object is owned by ViewNode; do not modify it.
Returns null if there is no transformation applied to the view.

It's only relevant when the `https://developer.android.com/reference/android/app/assist/AssistStructure` is used for assist purposes,
not for autofill purposes.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/graphics/Matrix` | <br /> |

### getVisibility

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getVisibility ()
```

Returns the visibility mode of this view, as per
`https://developer.android.com/reference/android/view/View#getVisibility()`.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### getWebDomain

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String getWebDomain ()
```

Returns the domain of the HTML document represented by this view.

Typically used when the view associated with the view is a container for an HTML
document.

**Warning:** an autofill service cannot trust the value reported by this method
without verifing its authenticity---see the "Web security" section of
`https://developer.android.com/reference/android/service/autofill/AutofillService` for more details.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | domain-only part of the document. For example, if the full URL is `https://example.com/login?user=my_user`, it returns `example.com`. This value may be `null`. <br /> |

### getWebScheme

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String getWebScheme ()
```

Returns the scheme of the HTML document represented by this view.

Typically used when the view associated with the view is a container for an HTML
document.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | scheme-only part of the document. For example, if the full URL is `https://example.com/login?user=my_user`, it returns `https`. This value may be `null`. <br /> |

### getWidth

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getWidth ()
```

Returns the width of this view, in pixels.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### isAccessibilityFocused

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isAccessibilityFocused ()
```

Returns true if this node currently had accessibility focus at the time that the
structure was collected.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### isActivated

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isActivated ()
```

Returns true if this node has currently been activated by the user.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### isAssistBlocked

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isAssistBlocked ()
```

Returns true if assist data has been blocked starting at this node in the hierarchy.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### isCheckable

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isCheckable ()
```

Returns true if this node represents something that is checkable by the user.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### isChecked

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isChecked ()
```

Returns true if this node is currently in a checked state.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### isClickable

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isClickable ()
```

Returns true if this node is clickable by the user.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### isContextClickable

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isContextClickable ()
```

Returns true if this node is something the user can perform a context click on.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### isEnabled

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isEnabled ()
```

Returns true if this node is in an enabled state.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### isFocusable

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isFocusable ()
```

Returns true if this node can take input focus.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### isFocused

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isFocused ()
```

Returns true if this node currently had input focus at the time that the
structure was collected.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### isLongClickable

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isLongClickable ()
```

Returns true if this node is something the user can perform a long click/press on.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### isOpaque

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isOpaque ()
```

Returns true if this node is opaque.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### isSelected

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isSelected ()
```

Returns true if this node has currently been selected by the user.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |