FileDocCategorySizeDatePackage
AccessibilityNodeInfoCompat.javaAPI DocAndroid 5.1 API87012Thu Mar 12 22:22:56 GMT 2015android.support.v4.view.accessibility

AccessibilityNodeInfoCompat

public class AccessibilityNodeInfoCompat extends Object
Helper for accessing {@link android.view.accessibility.AccessibilityNodeInfo} introduced after API level 4 in a backwards compatible fashion.

Fields Summary
private static final AccessibilityNodeInfoImpl
IMPL
private final Object
mInfo
public static final int
ACTION_FOCUS
Action that focuses the node.
public static final int
ACTION_CLEAR_FOCUS
Action that unfocuses the node.
public static final int
ACTION_SELECT
Action that selects the node.
public static final int
ACTION_CLEAR_SELECTION
Action that unselects the node.
public static final int
ACTION_CLICK
Action that clicks on the node info.
public static final int
ACTION_LONG_CLICK
Action that long clicks on the node.
public static final int
ACTION_ACCESSIBILITY_FOCUS
Action that gives accessibility focus to the node.
public static final int
ACTION_CLEAR_ACCESSIBILITY_FOCUS
Action that clears accessibility focus of the node.
public static final int
ACTION_NEXT_AT_MOVEMENT_GRANULARITY
Action that requests to go to the next entity in this node's text at a given movement granularity. For example, move to the next character, word, etc.

Arguments: {@link #ACTION_ARGUMENT_MOVEMENT_GRANULARITY_INT}<, {@link #ACTION_ARGUMENT_EXTEND_SELECTION_BOOLEAN}
Example: Move to the previous character and do not extend selection.

Bundle arguments = new Bundle(); arguments.putInt(AccessibilityNodeInfo.ACTION_ARGUMENT_MOVEMENT_GRANULARITY_INT, AccessibilityNodeInfo.MOVEMENT_GRANULARITY_CHARACTER); arguments.putBoolean(AccessibilityNodeInfo.ACTION_ARGUMENT_EXTEND_SELECTION_BOOLEAN, false); info.performAction(AccessibilityNodeInfo.ACTION_NEXT_AT_MOVEMENT_GRANULARITY, arguments);

public static final int
ACTION_PREVIOUS_AT_MOVEMENT_GRANULARITY
Action that requests to go to the previous entity in this node's text at a given movement granularity. For example, move to the next character, word, etc.

Arguments: {@link #ACTION_ARGUMENT_MOVEMENT_GRANULARITY_INT}<, {@link #ACTION_ARGUMENT_EXTEND_SELECTION_BOOLEAN}
Example: Move to the next character and do not extend selection.

Bundle arguments = new Bundle(); arguments.putInt(AccessibilityNodeInfo.ACTION_ARGUMENT_MOVEMENT_GRANULARITY_INT, AccessibilityNodeInfo.MOVEMENT_GRANULARITY_CHARACTER); arguments.putBoolean(AccessibilityNodeInfo.ACTION_ARGUMENT_EXTEND_SELECTION_BOOLEAN, false); info.performAction(AccessibilityNodeInfo.ACTION_PREVIOUS_AT_MOVEMENT_GRANULARITY, arguments);

public static final int
ACTION_NEXT_HTML_ELEMENT
Action to move to the next HTML element of a given type. For example, move to the BUTTON, INPUT, TABLE, etc.

Arguments: {@link #ACTION_ARGUMENT_HTML_ELEMENT_STRING}
Example:

Bundle arguments = new Bundle(); arguments.putString(AccessibilityNodeInfo.ACTION_ARGUMENT_HTML_ELEMENT_STRING, "BUTTON"); info.performAction(AccessibilityNodeInfo.ACTION_NEXT_HTML_ELEMENT, arguments);

public static final int
ACTION_PREVIOUS_HTML_ELEMENT
Action to move to the previous HTML element of a given type. For example, move to the BUTTON, INPUT, TABLE, etc.

Arguments: {@link #ACTION_ARGUMENT_HTML_ELEMENT_STRING}
Example:

Bundle arguments = new Bundle(); arguments.putString(AccessibilityNodeInfo.ACTION_ARGUMENT_HTML_ELEMENT_STRING, "BUTTON"); info.performAction(AccessibilityNodeInfo.ACTION_PREVIOUS_HTML_ELEMENT, arguments);

public static final int
ACTION_SCROLL_FORWARD
Action to scroll the node content forward.
public static final int
ACTION_SCROLL_BACKWARD
Action to scroll the node content backward.
public static final int
ACTION_COPY
Action to copy the current selection to the clipboard.
public static final int
ACTION_PASTE
Action to paste the current clipboard content.
public static final int
ACTION_CUT
Action to cut the current selection and place it to the clipboard.
public static final int
ACTION_SET_SELECTION
Action to set the selection. Performing this action with no arguments clears the selection.

Arguments: {@link #ACTION_ARGUMENT_SELECTION_START_INT}, {@link #ACTION_ARGUMENT_SELECTION_END_INT}
Example:

Bundle arguments = new Bundle(); arguments.putInt(AccessibilityNodeInfo.ACTION_ARGUMENT_SELECTION_START_INT, 1); arguments.putInt(AccessibilityNodeInfo.ACTION_ARGUMENT_SELECTION_END_INT, 2); info.performAction(AccessibilityNodeInfo.ACTION_SET_SELECTION, arguments);

public static final int
ACTION_SET_TEXT
Action that sets the text of the node. Performing the action without argument, using null or empty {@link CharSequence} will clear the text. This action will also put the cursor at the end of text.

Arguments: {@link #ACTION_ARGUMENT_SET_TEXT_CHARSEQUENCE}
Example:

Bundle arguments = new Bundle(); arguments.putCharSequence(AccessibilityNodeInfo.ACTION_ARGUMENT_SET_TEXT_CHARSEQUENCE, "android"); info.performAction(AccessibilityNodeInfo.ACTION_SET_TEXT, arguments);

public static final String
ACTION_ARGUMENT_MOVEMENT_GRANULARITY_INT
Argument for which movement granularity to be used when traversing the node text.

Type: int
Actions: {@link #ACTION_NEXT_AT_MOVEMENT_GRANULARITY}, {@link #ACTION_PREVIOUS_AT_MOVEMENT_GRANULARITY}

public static final String
ACTION_ARGUMENT_HTML_ELEMENT_STRING
Argument for which HTML element to get moving to the next/previous HTML element.

Type: String
Actions: {@link #ACTION_NEXT_HTML_ELEMENT}, {@link #ACTION_PREVIOUS_HTML_ELEMENT}

public static final String
ACTION_ARGUMENT_EXTEND_SELECTION_BOOLEAN
Argument for whether when moving at granularity to extend the selection or to move it otherwise.

Type: boolean
Actions: {@link #ACTION_NEXT_AT_MOVEMENT_GRANULARITY}, {@link #ACTION_PREVIOUS_AT_MOVEMENT_GRANULARITY}

public static final String
ACTION_ARGUMENT_SELECTION_START_INT
Argument for specifying the selection start.

Type: int
Actions: {@link #ACTION_SET_SELECTION}

public static final String
ACTION_ARGUMENT_SELECTION_END_INT
Argument for specifying the selection end.

Type: int
Actions: {@link #ACTION_SET_SELECTION}

public static final String
ACTION_ARGUMENT_SET_TEXT_CHARSEQUENCE
Argument for specifying the text content to set

Type: CharSequence
Actions: {@link #ACTION_SET_TEXT}

public static final int
FOCUS_INPUT
The input focus.
public static final int
FOCUS_ACCESSIBILITY
The accessibility focus.
public static final int
MOVEMENT_GRANULARITY_CHARACTER
Movement granularity bit for traversing the text of a node by character.
public static final int
MOVEMENT_GRANULARITY_WORD
Movement granularity bit for traversing the text of a node by word.
public static final int
MOVEMENT_GRANULARITY_LINE
Movement granularity bit for traversing the text of a node by line.
public static final int
MOVEMENT_GRANULARITY_PARAGRAPH
Movement granularity bit for traversing the text of a node by paragraph.
public static final int
MOVEMENT_GRANULARITY_PAGE
Movement granularity bit for traversing the text of a node by page.
Constructors Summary
public AccessibilityNodeInfoCompat(Object info)
Creates a new instance wrapping an {@link android.view.accessibility.AccessibilityNodeInfo}.

param
info The info.

        mInfo = info;
    
Methods Summary
public voidaddAction(int action)
Adds an action that can be performed on the node.

Note: Cannot be called from an {@link android.accessibilityservice.AccessibilityService}. This class is made immutable before being delivered to an AccessibilityService.

param
action The action.
throws
IllegalStateException If called from an AccessibilityService.

        IMPL.addAction(mInfo, action);
    
public voidaddAction(android.support.v4.view.accessibility.AccessibilityNodeInfoCompat$AccessibilityActionCompat action)
Adds an action that can be performed on the node.

Note: Cannot be called from an {@link android.accessibilityservice.AccessibilityService}. This class is made immutable before being delivered to an AccessibilityService.

param
action The action.
throws
IllegalStateException If called from an AccessibilityService.

        IMPL.addAction(mInfo, action.mAction);
    
public voidaddChild(android.view.View child)
Adds a child.

Note: Cannot be called from an {@link android.accessibilityservice.AccessibilityService}. This class is made immutable before being delivered to an AccessibilityService.

param
child The child.
throws
IllegalStateException If called from an AccessibilityService.

        IMPL.addChild(mInfo, child);
    
public voidaddChild(android.view.View root, int virtualDescendantId)
Adds a virtual child which is a descendant of the given root. If virtualDescendantId is {@link View#NO_ID} the root is added as a child.

A virtual descendant is an imaginary View that is reported as a part of the view hierarchy for accessibility purposes. This enables custom views that draw complex content to report them selves as a tree of virtual views, thus conveying their logical structure.

param
root The root of the virtual subtree.
param
virtualDescendantId The id of the virtual child.

        IMPL.addChild(mInfo, root, virtualDescendantId);
    
public booleanequals(java.lang.Object obj)

        if (this == obj) {
            return true;
        }
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        AccessibilityNodeInfoCompat other = (AccessibilityNodeInfoCompat) obj;
        if (mInfo == null) {
            if (other.mInfo != null) {
                return false;
            }
        } else if (!mInfo.equals(other.mInfo)) {
            return false;
        }
        return true;
    
public java.util.ListfindAccessibilityNodeInfosByText(java.lang.String text)
Finds {@link android.view.accessibility.AccessibilityNodeInfo}s by text. The match is case insensitive containment. The search is relative to this info i.e. this info is the root of the traversed tree.

Note: It is a client responsibility to recycle the received info by calling {@link android.view.accessibility.AccessibilityNodeInfo#recycle()} to avoid creating of multiple instances.

param
text The searched text.
return
A list of node info.

        List<AccessibilityNodeInfoCompat> result = new ArrayList<AccessibilityNodeInfoCompat>();
        List<Object> infos = IMPL.findAccessibilityNodeInfosByText(mInfo, text);
        final int infoCount = infos.size();
        for (int i = 0; i < infoCount; i++) {
            Object info = infos.get(i);
            result.add(new AccessibilityNodeInfoCompat(info));
        }
        return result;
    
public android.support.v4.view.accessibility.AccessibilityNodeInfoCompatfindFocus(int focus)
Find the view that has the specified focus type. The search starts from the view represented by this node info.

param
focus The focus to find. One of {@link #FOCUS_INPUT} or {@link #FOCUS_ACCESSIBILITY}.
return
The node info of the focused view or null.
see
#FOCUS_INPUT
see
#FOCUS_ACCESSIBILITY

        return AccessibilityNodeInfoCompat.wrapNonNullInstance(IMPL.findFocus(mInfo, focus));
    
public android.support.v4.view.accessibility.AccessibilityNodeInfoCompatfocusSearch(int direction)
Searches for the nearest view in the specified direction that can take input focus.

param
direction The direction. Can be one of: {@link View#FOCUS_DOWN}, {@link View#FOCUS_UP}, {@link View#FOCUS_LEFT}, {@link View#FOCUS_RIGHT}, {@link View#FOCUS_FORWARD}, {@link View#FOCUS_BACKWARD}.
return
The node info for the view that can take accessibility focus.

        return AccessibilityNodeInfoCompat.wrapNonNullInstance(IMPL.focusSearch(mInfo, direction));
    
public java.util.ListgetActionList()
Gets the actions that can be performed on the node.

return
A list of AccessibilityActions.

        List<Object> actions = IMPL.getActionList(mInfo);
        if (actions != null) {
            List<AccessibilityActionCompat> result = new ArrayList<AccessibilityActionCompat>();
            final int actionCount = actions.size();
            for (int i = 0; i < actionCount; i++) {
                Object action = actions.get(i);
                result.add(new AccessibilityActionCompat(action));
            }
            return result;
        } else {
            return Collections.<AccessibilityActionCompat>emptyList();
        }
    
private static java.lang.StringgetActionSymbolicName(int action)

        switch (action) {
            case ACTION_FOCUS:
                return "ACTION_FOCUS";
            case ACTION_CLEAR_FOCUS:
                return "ACTION_CLEAR_FOCUS";
            case ACTION_SELECT:
                return "ACTION_SELECT";
            case ACTION_CLEAR_SELECTION:
                return "ACTION_CLEAR_SELECTION";
            case ACTION_CLICK:
                return "ACTION_CLICK";
            case ACTION_LONG_CLICK:
                return "ACTION_LONG_CLICK";
            case ACTION_ACCESSIBILITY_FOCUS:
                return "ACTION_ACCESSIBILITY_FOCUS";
            case ACTION_CLEAR_ACCESSIBILITY_FOCUS:
                return "ACTION_CLEAR_ACCESSIBILITY_FOCUS";
            case ACTION_NEXT_AT_MOVEMENT_GRANULARITY:
                return "ACTION_NEXT_AT_MOVEMENT_GRANULARITY";
            case ACTION_PREVIOUS_AT_MOVEMENT_GRANULARITY:
                return "ACTION_PREVIOUS_AT_MOVEMENT_GRANULARITY";
            case ACTION_NEXT_HTML_ELEMENT:
                return "ACTION_NEXT_HTML_ELEMENT";
            case ACTION_PREVIOUS_HTML_ELEMENT:
                return "ACTION_PREVIOUS_HTML_ELEMENT";
            case ACTION_SCROLL_FORWARD:
                return "ACTION_SCROLL_FORWARD";
            case ACTION_SCROLL_BACKWARD:
                return "ACTION_SCROLL_BACKWARD";
            case ACTION_CUT:
                return "ACTION_CUT";
            case ACTION_COPY:
                return "ACTION_COPY";
            case ACTION_PASTE:
                return "ACTION_PASTE";
            case ACTION_SET_SELECTION:
                return "ACTION_SET_SELECTION";
            default:
                return"ACTION_UNKNOWN";
        }
    
public intgetActions()
Gets the actions that can be performed on the node.

return
The bit mask of with actions.
see
android.view.accessibility.AccessibilityNodeInfo#ACTION_FOCUS
see
android.view.accessibility.AccessibilityNodeInfo#ACTION_CLEAR_FOCUS
see
android.view.accessibility.AccessibilityNodeInfo#ACTION_SELECT
see
android.view.accessibility.AccessibilityNodeInfo#ACTION_CLEAR_SELECTION

        return IMPL.getActions(mInfo);
    
public voidgetBoundsInParent(android.graphics.Rect outBounds)
Gets the node bounds in parent coordinates.

param
outBounds The output node bounds.

        IMPL.getBoundsInParent(mInfo, outBounds);
    
public voidgetBoundsInScreen(android.graphics.Rect outBounds)
Gets the node bounds in screen coordinates.

param
outBounds The output node bounds.

        IMPL.getBoundsInScreen(mInfo, outBounds);
    
public android.support.v4.view.accessibility.AccessibilityNodeInfoCompatgetChild(int index)
Get the child at given index.

Note: It is a client responsibility to recycle the received info by calling {@link AccessibilityNodeInfoCompat#recycle()} to avoid creating of multiple instances.

param
index The child index.
return
The child node.
throws
IllegalStateException If called outside of an AccessibilityService.

        return AccessibilityNodeInfoCompat.wrapNonNullInstance(IMPL.getChild(mInfo, index));
    
public intgetChildCount()
Gets the number of children.

return
The child count.

        return IMPL.getChildCount(mInfo);
    
public java.lang.CharSequencegetClassName()
Gets the class this node comes from.

return
The class name.

        return IMPL.getClassName(mInfo);
    
public android.support.v4.view.accessibility.AccessibilityNodeInfoCompat$CollectionInfoCompatgetCollectionInfo()
Gets the collection info if the node is a collection. A collection child is always a collection item.

return
The collection info.

        Object info = IMPL.getCollectionInfo(mInfo);
        if (info == null) return null;
        return new CollectionInfoCompat(info);
    
public android.support.v4.view.accessibility.AccessibilityNodeInfoCompat$CollectionItemInfoCompatgetCollectionItemInfo()
Gets the collection item info if the node is a collection item. A collection item is always a child of a collection.

return
The collection item info.

        Object info = IMPL.getCollectionItemInfo(mInfo);
        if (info == null) return null;
        return new CollectionItemInfoCompat(info);
    
public java.lang.CharSequencegetContentDescription()
Gets the content description of this node.

return
The content description.

        return IMPL.getContentDescription(mInfo);
    
public java.lang.ObjectgetInfo()

return
The wrapped {@link android.view.accessibility.AccessibilityNodeInfo}.

        return mInfo;
    
public intgetLiveRegion()
Gets the node's live region mode.

A live region is a node that contains information that is important for the user and when it changes the user should be notified. For example, in a login screen with a TextView that displays an "incorrect password" notification, that view should be marked as a live region with mode {@link ViewCompat#ACCESSIBILITY_LIVE_REGION_POLITE}.

It is the responsibility of the accessibility service to monitor {@link AccessibilityEventCompat#TYPE_WINDOW_CONTENT_CHANGED} events indicating changes to live region nodes and their children.

return
The live region mode, or {@link ViewCompat#ACCESSIBILITY_LIVE_REGION_NONE} if the view is not a live region.
see
ViewCompat#getAccessibilityLiveRegion(View)

        return IMPL.getLiveRegion(mInfo);
    
public intgetMovementGranularities()
Gets the movement granularities for traversing the text of this node.

return
The bit mask with granularities.

        return IMPL.getMovementGranularities(mInfo);
    
public java.lang.CharSequencegetPackageName()
Gets the package this node comes from.

return
The package name.

        return IMPL.getPackageName(mInfo);
    
public android.support.v4.view.accessibility.AccessibilityNodeInfoCompatgetParent()
Gets the parent.

Note: It is a client responsibility to recycle the received info by calling {@link android.view.accessibility.AccessibilityNodeInfo#recycle()} to avoid creating of multiple instances.

return
The parent.

        return AccessibilityNodeInfoCompat.wrapNonNullInstance(IMPL.getParent(mInfo));
    
public android.support.v4.view.accessibility.AccessibilityNodeInfoCompat$RangeInfoCompatgetRangeInfo()
Gets the range info if this node is a range.

return
The range.

        Object info = IMPL.getRangeInfo(mInfo);
        if (info == null) return null;
        return new RangeInfoCompat(info);
    
public java.lang.CharSequencegetText()
Gets the text of this node.

return
The text.

        return IMPL.getText(mInfo);
    
public java.lang.StringgetViewIdResourceName()
Gets the fully qualified resource name of the source view's id.

Note: The primary usage of this API is for UI test automation and in order to report the source view id of an {@link AccessibilityNodeInfoCompat} the client has to set the {@link AccessibilityServiceInfoCompat#FLAG_REPORT_VIEW_IDS} flag when configuring his {@link android.accessibilityservice.AccessibilityService}.

return
The id resource name.

        return IMPL.getViewIdResourceName(mInfo);
    
public intgetWindowId()
Gets the id of the window from which the info comes from.

return
The window id.

        return IMPL.getWindowId(mInfo);
    
public inthashCode()

        return (mInfo == null) ? 0 : mInfo.hashCode();
    
public booleanisAccessibilityFocused()
Gets whether this node is accessibility focused.

return
True if the node is accessibility focused.

        return IMPL.isAccessibilityFocused(mInfo);
    
public booleanisCheckable()
Gets whether this node is checkable.

return
True if the node is checkable.

        return IMPL.isCheckable(mInfo);
    
public booleanisChecked()
Gets whether this node is checked.

return
True if the node is checked.

        return IMPL.isChecked(mInfo);
    
public booleanisClickable()
Gets whether this node is clickable.

return
True if the node is clickable.

        return IMPL.isClickable(mInfo);
    
public booleanisEnabled()
Gets whether this node is enabled.

return
True if the node is enabled.

        return IMPL.isEnabled(mInfo);
    
public booleanisFocusable()
Gets whether this node is focusable.

return
True if the node is focusable.

        return IMPL.isFocusable(mInfo);
    
public booleanisFocused()
Gets whether this node is focused.

return
True if the node is focused.

        return IMPL.isFocused(mInfo);
    
public booleanisLongClickable()
Gets whether this node is long clickable.

return
True if the node is long clickable.

        return IMPL.isLongClickable(mInfo);
    
public booleanisPassword()
Gets whether this node is a password.

return
True if the node is a password.

        return IMPL.isPassword(mInfo);
    
public booleanisScrollable()
Gets if the node is scrollable.

return
True if the node is scrollable, false otherwise.

        return IMPL.isScrollable(mInfo);
    
public booleanisSelected()
Gets whether this node is selected.

return
True if the node is selected.

        return IMPL.isSelected(mInfo);
    
public booleanisVisibleToUser()
Sets whether this node is visible to the user.

return
Whether the node is visible to the user.

        return IMPL.isVisibleToUser(mInfo);
    
public static android.support.v4.view.accessibility.AccessibilityNodeInfoCompatobtain(android.view.View source)
Returns a cached instance if such is available otherwise a new one and sets the source.

return
An instance.
see
#setSource(View)

        return AccessibilityNodeInfoCompat.wrapNonNullInstance(IMPL.obtain(source));
    
public static android.support.v4.view.accessibility.AccessibilityNodeInfoCompatobtain(android.view.View root, int virtualDescendantId)
Returns a cached instance if such is available otherwise a new one and sets the source.

param
root The root of the virtual subtree.
param
virtualDescendantId The id of the virtual descendant.
return
An instance.
see
#setSource(View, int)

        return AccessibilityNodeInfoCompat.wrapNonNullInstance(
                IMPL.obtain(root, virtualDescendantId));
    
public static android.support.v4.view.accessibility.AccessibilityNodeInfoCompatobtain()
Returns a cached instance if such is available otherwise a new one.

return
An instance.

        return AccessibilityNodeInfoCompat.wrapNonNullInstance(IMPL.obtain());
    
public static android.support.v4.view.accessibility.AccessibilityNodeInfoCompatobtain(android.support.v4.view.accessibility.AccessibilityNodeInfoCompat info)
Returns a cached instance if such is available or a new one is create. The returned instance is initialized from the given info.

param
info The other info.
return
An instance.

        return AccessibilityNodeInfoCompat.wrapNonNullInstance(IMPL.obtain(info.mInfo));
    
public booleanperformAction(int action)
Performs an action on the node.

Note: An action can be performed only if the request is made from an {@link android.accessibilityservice.AccessibilityService}.

param
action The action to perform.
return
True if the action was performed.
throws
IllegalStateException If called outside of an AccessibilityService.

        return IMPL.performAction(mInfo, action);
    
public booleanperformAction(int action, android.os.Bundle arguments)
Performs an action on the node.

Note: An action can be performed only if the request is made from an {@link android.accessibilityservice.AccessibilityService}.

param
action The action to perform.
param
arguments A bundle with additional arguments.
return
True if the action was performed.
throws
IllegalStateException If called outside of an AccessibilityService.

        return IMPL.performAction(mInfo, action, arguments);
    
public voidrecycle()
Return an instance back to be reused.

Note: You must not touch the object after calling this function.

throws
IllegalStateException If the info is already recycled.

        IMPL.recycle(mInfo);
    
public voidsetAccessibilityFocused(boolean focused)
Sets whether this node is accessibility focused.

Note: Cannot be called from an {@link android.accessibilityservice.AccessibilityService}. This class is made immutable before being delivered to an AccessibilityService.

param
focused True if the node is accessibility focused.
throws
IllegalStateException If called from an AccessibilityService.

        IMPL.setAccessibilityFocused(mInfo, focused);
    
public voidsetBoundsInParent(android.graphics.Rect bounds)
Sets the node bounds in parent coordinates.

Note: Cannot be called from an {@link android.accessibilityservice.AccessibilityService}. This class is made immutable before being delivered to an AccessibilityService.

param
bounds The node bounds.
throws
IllegalStateException If called from an AccessibilityService.

        IMPL.setBoundsInParent(mInfo, bounds);
    
public voidsetBoundsInScreen(android.graphics.Rect bounds)
Sets the node bounds in screen coordinates.

Note: Cannot be called from an {@link android.accessibilityservice.AccessibilityService}. This class is made immutable before being delivered to an AccessibilityService.

param
bounds The node bounds.
throws
IllegalStateException If called from an AccessibilityService.

        IMPL.setBoundsInScreen(mInfo, bounds);
    
public voidsetCheckable(boolean checkable)
Sets whether this node is checkable.

Note: Cannot be called from an {@link android.accessibilityservice.AccessibilityService}. This class is made immutable before being delivered to an AccessibilityService.

param
checkable True if the node is checkable.
throws
IllegalStateException If called from an AccessibilityService.

        IMPL.setCheckable(mInfo, checkable);
    
public voidsetChecked(boolean checked)
Sets whether this node is checked.

Note: Cannot be called from an {@link android.accessibilityservice.AccessibilityService}. This class is made immutable before being delivered to an AccessibilityService.

param
checked True if the node is checked.
throws
IllegalStateException If called from an AccessibilityService.

        IMPL.setChecked(mInfo, checked);
    
public voidsetClassName(java.lang.CharSequence className)
Sets the class this node comes from.

Note: Cannot be called from an {@link android.accessibilityservice.AccessibilityService}. This class is made immutable before being delivered to an AccessibilityService.

param
className The class name.
throws
IllegalStateException If called from an AccessibilityService.

        IMPL.setClassName(mInfo, className);
    
public voidsetClickable(boolean clickable)
Sets whether this node is clickable.

Note: Cannot be called from an {@link android.accessibilityservice.AccessibilityService}. This class is made immutable before being delivered to an AccessibilityService.

param
clickable True if the node is clickable.
throws
IllegalStateException If called from an AccessibilityService.

        IMPL.setClickable(mInfo, clickable);
    
public voidsetCollectionInfo(java.lang.Object collectionInfo)

        IMPL.setCollectionInfo(mInfo, ((CollectionInfoCompat) collectionInfo).mInfo);
    
public voidsetCollectionItemInfo(java.lang.Object collectionItemInfo)

        IMPL.setCollectionItemInfo(mInfo, ((CollectionItemInfoCompat) collectionItemInfo).mInfo);
    
public voidsetContentDescription(java.lang.CharSequence contentDescription)
Sets the content description of this node.

Note: Cannot be called from an {@link android.accessibilityservice.AccessibilityService}. This class is made immutable before being delivered to an AccessibilityService.

param
contentDescription The content description.
throws
IllegalStateException If called from an AccessibilityService.

        IMPL.setContentDescription(mInfo, contentDescription);
    
public voidsetEnabled(boolean enabled)
Sets whether this node is enabled.

Note: Cannot be called from an {@link android.accessibilityservice.AccessibilityService}. This class is made immutable before being delivered to an AccessibilityService.

param
enabled True if the node is enabled.
throws
IllegalStateException If called from an AccessibilityService.

        IMPL.setEnabled(mInfo, enabled);
    
public voidsetFocusable(boolean focusable)
Sets whether this node is focusable.

Note: Cannot be called from an {@link android.accessibilityservice.AccessibilityService}. This class is made immutable before being delivered to an AccessibilityService.

param
focusable True if the node is focusable.
throws
IllegalStateException If called from an AccessibilityService.

        IMPL.setFocusable(mInfo, focusable);
    
public voidsetFocused(boolean focused)
Sets whether this node is focused.

Note: Cannot be called from an {@link android.accessibilityservice.AccessibilityService}. This class is made immutable before being delivered to an AccessibilityService.

param
focused True if the node is focused.
throws
IllegalStateException If called from an AccessibilityService.

        IMPL.setFocused(mInfo, focused);
    
public voidsetLiveRegion(int mode)
Sets the node's live region mode.

Note: Cannot be called from an {@link android.accessibilityservice.AccessibilityService}. This class is made immutable before being delivered to an AccessibilityService.

param
mode The live region mode, or {@link ViewCompat#ACCESSIBILITY_LIVE_REGION_NONE} if the view is not a live region.
see
ViewCompat#setAccessibilityLiveRegion(View, int)

        IMPL.setLiveRegion(mInfo, mode);
    
public voidsetLongClickable(boolean longClickable)
Sets whether this node is long clickable.

Note: Cannot be called from an {@link android.accessibilityservice.AccessibilityService}. This class is made immutable before being delivered to an AccessibilityService.

param
longClickable True if the node is long clickable.
throws
IllegalStateException If called from an AccessibilityService.

        IMPL.setLongClickable(mInfo, longClickable);
    
public voidsetMovementGranularities(int granularities)
Sets the movement granularities for traversing the text of this node.

Note: Cannot be called from an {@link android.accessibilityservice.AccessibilityService}. This class is made immutable before being delivered to an AccessibilityService.

param
granularities The bit mask with granularities.
throws
IllegalStateException If called from an AccessibilityService.

        IMPL.setMovementGranularities(mInfo, granularities);
    
public voidsetPackageName(java.lang.CharSequence packageName)
Sets the package this node comes from.

Note: Cannot be called from an {@link android.accessibilityservice.AccessibilityService}. This class is made immutable before being delivered to an AccessibilityService.

param
packageName The package name.
throws
IllegalStateException If called from an AccessibilityService.

        IMPL.setPackageName(mInfo, packageName);
    
public voidsetParent(android.view.View parent)
Sets the parent.

Note: Cannot be called from an {@link android.accessibilityservice.AccessibilityService}. This class is made immutable before being delivered to an AccessibilityService.

param
parent The parent.
throws
IllegalStateException If called from an AccessibilityService.

        IMPL.setParent(mInfo, parent);
    
public voidsetParent(android.view.View root, int virtualDescendantId)
Sets the parent to be a virtual descendant of the given root. If virtualDescendantId equals to {@link View#NO_ID} the root is set as the parent.

A virtual descendant is an imaginary View that is reported as a part of the view hierarchy for accessibility purposes. This enables custom views that draw complex content to report them selves as a tree of virtual views, thus conveying their logical structure.

Note: Cannot be called from an {@link android.accessibilityservice.AccessibilityService}. This class is made immutable before being delivered to an AccessibilityService.

param
root The root of the virtual subtree.
param
virtualDescendantId The id of the virtual descendant.

        IMPL.setParent(mInfo, root, virtualDescendantId);
    
public voidsetPassword(boolean password)
Sets whether this node is a password.

Note: Cannot be called from an {@link android.accessibilityservice.AccessibilityService}. This class is made immutable before being delivered to an AccessibilityService.

param
password True if the node is a password.
throws
IllegalStateException If called from an AccessibilityService.

        IMPL.setPassword(mInfo, password);
    
public voidsetScrollable(boolean scrollable)
Sets if the node is scrollable.

Note: Cannot be called from an {@link android.accessibilityservice.AccessibilityService}. This class is made immutable before being delivered to an AccessibilityService.

param
scrollable True if the node is scrollable, false otherwise.
throws
IllegalStateException If called from an AccessibilityService.

        IMPL.setScrollable(mInfo, scrollable);
    
public voidsetSelected(boolean selected)
Sets whether this node is selected.

Note: Cannot be called from an {@link android.accessibilityservice.AccessibilityService}. This class is made immutable before being delivered to an AccessibilityService.

param
selected True if the node is selected.
throws
IllegalStateException If called from an AccessibilityService.

        IMPL.setSelected(mInfo, selected);
    
public voidsetSource(android.view.View source)
Sets the source.

param
source The info source.

        IMPL.setSource(mInfo, source);
    
public voidsetSource(android.view.View root, int virtualDescendantId)
Sets the source to be a virtual descendant of the given root. If virtualDescendantId is {@link View#NO_ID} the root is set as the source.

A virtual descendant is an imaginary View that is reported as a part of the view hierarchy for accessibility purposes. This enables custom views that draw complex content to report themselves as a tree of virtual views, thus conveying their logical structure.

Note: Cannot be called from an {@link android.accessibilityservice.AccessibilityService}. This class is made immutable before being delivered to an AccessibilityService.

param
root The root of the virtual subtree.
param
virtualDescendantId The id of the virtual descendant.

        IMPL.setSource(mInfo, root, virtualDescendantId);
    
public voidsetText(java.lang.CharSequence text)
Sets the text of this node.

Note: Cannot be called from an {@link android.accessibilityservice.AccessibilityService}. This class is made immutable before being delivered to an AccessibilityService.

param
text The text.
throws
IllegalStateException If called from an AccessibilityService.

        IMPL.setText(mInfo, text);
    
public voidsetViewIdResourceName(java.lang.String viewId)
Sets the fully qualified resource name of the source view's id.

Note: Cannot be called from an {@link android.accessibilityservice.AccessibilityService}. This class is made immutable before being delivered to an AccessibilityService.

param
viewId The id resource name.

        IMPL.setViewIdResourceName(mInfo, viewId);
    
public voidsetVisibleToUser(boolean visibleToUser)
Sets whether this node is visible to the user.

Note: Cannot be called from an {@link android.accessibilityservice.AccessibilityService}. This class is made immutable before being delivered to an AccessibilityService.

param
visibleToUser Whether the node is visible to the user.
throws
IllegalStateException If called from an AccessibilityService.

        IMPL.setVisibleToUser(mInfo, visibleToUser);
    
public java.lang.StringtoString()

        StringBuilder builder = new StringBuilder();
        builder.append(super.toString());

        Rect bounds = new Rect();

        getBoundsInParent(bounds);
        builder.append("; boundsInParent: " + bounds);

        getBoundsInScreen(bounds);
        builder.append("; boundsInScreen: " + bounds);

        builder.append("; packageName: ").append(getPackageName());
        builder.append("; className: ").append(getClassName());
        builder.append("; text: ").append(getText());
        builder.append("; contentDescription: ").append(getContentDescription());
        builder.append("; viewId: ").append(getViewIdResourceName());

        builder.append("; checkable: ").append(isCheckable());
        builder.append("; checked: ").append(isChecked());
        builder.append("; focusable: ").append(isFocusable());
        builder.append("; focused: ").append(isFocused());
        builder.append("; selected: ").append(isSelected());
        builder.append("; clickable: ").append(isClickable());
        builder.append("; longClickable: ").append(isLongClickable());
        builder.append("; enabled: ").append(isEnabled());
        builder.append("; password: ").append(isPassword());
        builder.append("; scrollable: " + isScrollable());

        builder.append("; [");
        for (int actionBits = getActions(); actionBits != 0;) {
            final int action = 1 << Integer.numberOfTrailingZeros(actionBits);
            actionBits &= ~action;
            builder.append(getActionSymbolicName(action));
            if (actionBits != 0) {
                builder.append(", ");
            }
        }
        builder.append("]");

        return builder.toString();
    
static android.support.v4.view.accessibility.AccessibilityNodeInfoCompatwrapNonNullInstance(java.lang.Object object)
Creates a wrapper for info implementation.

param
object The info to wrap.
return
A wrapper for if the object is not null, null otherwise.


                                 
        
        if (object != null) {
            return new AccessibilityNodeInfoCompat(object);
        }
        return null;