Android Guides | Samples

Android.Views.Accessibility.AccessibilityNodeInfo Class

This class represents a node of the window content as well as actions that can be requested from its source.

See Also: AccessibilityNodeInfo

Syntax

[Android.Runtime.Register("android/view/accessibility/AccessibilityNodeInfo", DoNotGenerateAcw=true)]
public class AccessibilityNodeInfo : Object, IParcelable, IDisposable

Remarks

This class represents a node of the window content as well as actions that can be requested from its source. From the point of view of an AccessibilityService a window content is presented as tree of accessibility node info which may or may not map one-to-one to the view hierarchy. In other words, a custom view is free to report itself as a tree of accessibility node info.

Once an accessibility node info is delivered to an accessibility service it is made immutable and calling a state mutation method generates an error.

Please refer to AccessibilityService for details about how to obtain a handle to window content as a tree of accessibility node info as well as familiarizing with the security model.

Developer Guides

For more information about making applications accessible, read the Accessibility developer guide.

See Also

[Android Documentation]

Requirements

Namespace: Android.Views.Accessibility
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 14

The members of Android.Views.Accessibility.AccessibilityNodeInfo are listed below.

See Also: Object

Protected Constructors

A constructor used when creating managed representations of JNI objects; called by the runtime.

Public Fields

const
ActionAccessibilityFocusAction (64). Action that gives accessibility focus to the node.
const
ActionArgumentExtendSelectionBooleanString. Argument for whether when moving at granularity to extend the selection or to move it otherwise.
const
ActionArgumentHtmlElementStringString. Argument for which HTML element to get moving to the next/previous HTML element.
const
ActionArgumentMovementGranularityIntString. Argument for which movement granularity to be used when traversing the node text.
const
ActionArgumentSelectionEndIntString. Argument for specifying the selection end.
const
ActionArgumentSelectionStartIntString. Argument for specifying the selection start.
const
ActionArgumentSetTextCharsequenceString. Argument for specifying the text content to set.
const
ActionClearAccessibilityFocusAction (128). Action that clears accessibility focus of the node.
const
ActionClearFocusAction (2). Action that clears input focus of the node.
const
ActionClearSelectionAction (8). Action that deselects the node.
const
ActionClickAction (16). Action that clicks on the node info.
const
ActionCollapseAction (524288). Action to collapse an expandable node.
const
ActionCopyAction (16384). Action to copy the current selection to the clipboard.
const
ActionCutAction (65536). Action to cut the current selection and place it to the clipboard.
const
ActionDismissAction (1048576). Action to dismiss a dismissable node.
const
ActionExpandAction (262144). Action to expand an expandable node.
const
ActionFocusAction (1). Action that gives input focus to the node.
const
ActionLongClickAction (32). Action that long clicks on the node.
const
ActionNextAtMovementGranularityAction (256). Action that requests to go to the next entity in this node's text at a given movement granularity.
const
ActionNextHtmlElementAction (1024). Action to move to the next HTML element of a given type.
const
ActionPasteAction (32768). Action to paste the current clipboard content.
const
ActionPreviousAtMovementGranularityAction (512). Action that requests to go to the previous entity in this node's text at a given movement granularity.
const
ActionPreviousHtmlElementAction (2048). Action to move to the previous HTML element of a given type.
const
ActionScrollBackwardAction (8192). Action to scroll the node content backward.
const
ActionScrollForwardAction (4096). Action to scroll the node content forward.
const
ActionSelectAction (4). Action that selects the node.
const
ActionSetSelectionAction (131072). Action to set the selection.
const
ActionSetTextAction (2097152). Action that sets the text of the node.
const
FocusAccessibilityNodeFocus (2). The accessibility focus.
const
FocusInputNodeFocus (1). The input focus.
const
MovementGranularityCharacterMovementGranularity (1). Movement granularity bit for traversing the text of a node by character.
const
MovementGranularityLineMovementGranularity (4). Movement granularity bit for traversing the text of a node by line.
const
MovementGranularityPageMovementGranularity (16). Movement granularity bit for traversing the text of a node by page.
const
MovementGranularityParagraphMovementGranularity (8). Movement granularity bit for traversing the text of a node by paragraph.
const
MovementGranularityWordMovementGranularity (2). Movement granularity bit for traversing the text of a node by word.

Public Properties

AccessibilityFocusedBoolean. Gets whether this node is accessibility focused.
[read-only]
ActionListIList<AccessibilityNodeInfo.AccessibilityAction>. Gets the actions that can be performed on the node.
[read-only]
ActionsAction. Gets the actions that can be performed on the node.
CheckableBoolean. Gets whether this node is checkable.
CheckedBoolean. Gets whether this node is checked.
[read-only]
ChildCountInt32. Gets the number of children.
ClassNameString.
ClassNameFormattedICharSequence. Gets the class this node comes from.
ClickableBoolean. Gets whether this node is clickable.
ContentDescriptionString.
ContentDescriptionFormattedICharSequence. Gets the content description of this node.
ContentInvalidBoolean. Gets if the content of this node is invalid.
[read-only]
static
CreatorIParcelableCreator.
DismissableBoolean. Gets if the node can be dismissed.
EditableBoolean. Gets if the node is editable.
EnabledBoolean. Gets whether this node is enabled.
ErrorString.
ErrorFormattedICharSequence. Gets the error text of this node.
[read-only]
ExtrasBundle. Gets an optional bundle with extra data.
FocusableBoolean. Gets whether this node is focusable.
FocusedBoolean. Gets whether this node is focused.
InputTypeInputTypes. Gets the input type of the source as defined by IInputType.
[read-only]
LabeledByAccessibilityNodeInfo. Gets the node info which serves as the label of the view represented by this info for accessibility purposes.
[read-only]
LabelForAccessibilityNodeInfo. Gets the node info for which the view represented by this info serves as a label for accessibility purposes.
LiveRegionAccessibilityLiveRegion. Gets the node's live region mode.
LongClickableBoolean. Gets whether this node is long clickable.
MaxTextLengthInt32. Returns the maximum text length for this node.
MovementGranularitiesMovementGranularity. Gets the movement granularities for traversing the text of this node.
MultiLineBoolean. Gets if the node is a multi line editable text.
PackageNameString.
PackageNameFormattedICharSequence. Gets the package this node comes from.
[read-only]
ParentAccessibilityNodeInfo. Gets the parent.
PasswordBoolean. Gets whether this node is a password.
ScrollableBoolean. Gets if the node is scrollable.
SelectedBoolean. Gets whether this node is selected.
TextString.
TextFormattedICharSequence. Gets the text of this node.
[read-only]
TextSelectionEndInt32. Gets the text selection end.
[read-only]
TextSelectionStartInt32. Gets the text selection start.
ViewIdResourceNameString. Gets the fully qualified resource name of the source view's id.
VisibleToUserBoolean. Gets whether this node is visible to the user.
[read-only]
WindowAccessibilityWindowInfo. Gets the window to which this node belongs.
[read-only]
WindowIdInt32. Gets the id of the window from which the info comes from.

Protected Properties

[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

AddAction(Action)
Adds an action that can be performed on the node.
AddChild(View)
Adds a child.
AddChild(View, Int32)
Adds a virtual child which is a descendant of the given root.
CanOpenPopup() : Boolean
Gets if this node opens a popup or a dialog.
DescribeContents() : Int32
Describe the kinds of special objects contained in this Parcelable's marshalled representation.
FindAccessibilityNodeInfosByText(String) : IList<AccessibilityNodeInfo>
Finds AccessibilityNodeInfos by text.
FindAccessibilityNodeInfosByViewId(String) : IList<AccessibilityNodeInfo>
Finds AccessibilityNodeInfos by the fully qualified view id's resource name where a fully qualified id is of the from "package:id/id_resource_name".
FindFocus(NodeFocus) : AccessibilityNodeInfo
Find the view that has the specified focus type.
FocusSearch(FocusSearchDirection) : AccessibilityNodeInfo
Searches for the nearest view in the specified direction that can take the input focus.
GetBoundsInParent(Rect)
Gets the node bounds in parent coordinates.
GetBoundsInScreen(Rect)
Gets the node bounds in screen coordinates.
GetChild(Int32) : AccessibilityNodeInfo
Get the child at given index.
GetCollectionInfo() : AccessibilityNodeInfo+CollectionInfo
Gets the collection info if the node is a collection.
GetCollectionItemInfo() : AccessibilityNodeInfo+CollectionItemInfo
Gets the collection item info if the node is a collection item.
GetRangeInfo() : AccessibilityNodeInfo+RangeInfo
Gets the range info if this node is a range.
static
Obtain() : AccessibilityNodeInfo
Returns a cached instance if such is available otherwise a new one.
static
Obtain(AccessibilityNodeInfo) : AccessibilityNodeInfo
Returns a cached instance if such is available or a new one is create.
static
Obtain(View) : AccessibilityNodeInfo
Returns a cached instance if such is available otherwise a new one and sets the source.
static
Obtain(View, Int32) : AccessibilityNodeInfo
Returns a cached instance if such is available otherwise a new one and sets the source.
PerformAction(Action) : Boolean
Performs an action on the node.
PerformAction(Action, Bundle) : Boolean
Performs an action on the node.
Recycle()
Return an instance back to be reused.
Refresh() : Boolean
Refreshes this info with the latest state of the view it represents.
RemoveAction(AccessibilityNodeInfo+AccessibilityAction) : Boolean
Removes an action that can be performed on the node.
RemoveAction(Int32)
Removes an action that can be performed on the node.
RemoveChild(View) : Boolean
Removes a child.
RemoveChild(View, Int32) : Boolean
Removes a virtual child which is a descendant of the given root.
SetBoundsInParent(Rect)
Sets the node bounds in parent coordinates.
SetBoundsInScreen(Rect)
Sets the node bounds in screen coordinates.
SetCanOpenPopup(Boolean)
Sets if this node opens a popup or a dialog.
SetCollectionInfo(AccessibilityNodeInfo+CollectionInfo)
Sets the collection info if the node is a collection.
SetCollectionItemInfo(AccessibilityNodeInfo+CollectionItemInfo)
Sets the collection item info if the node is a collection item.
SetLabeledBy(View)
Sets the view which serves as the label of the view represented by this info for accessibility purposes.
SetLabeledBy(View, Int32)
Sets the view which serves as the label of the view represented by this info for accessibility purposes.
SetLabelFor(View)
Sets the view for which the view represented by this info serves as a label for accessibility purposes.
SetLabelFor(View, Int32)
Sets the view for which the view represented by this info serves as a label for accessibility purposes.
SetParent(View)
Sets the parent.
SetParent(View, Int32)
Sets the parent to be a virtual descendant of the given root.
SetRangeInfo(AccessibilityNodeInfo+RangeInfo)
Sets the range info if this node is a range.
SetSource(View)
Sets the source.
SetSource(View, Int32)
Sets the source to be a virtual descendant of the given root.
SetTextSelection(Int32, Int32)
Sets the text selection start and end.
WriteToParcel(Parcel, ParcelableWriteFlags)
Flatten this object in to a Parcel.