|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectandroid.support.v4.view.accessibility.AccessibilityNodeInfoCompat
public class AccessibilityNodeInfoCompat
Helper for accessing AccessibilityNodeInfo
introduced after API level 4 in a backwards compatible fashion.
| Field Summary | |
|---|---|
static int |
ACTION_CLEAR_FOCUS
Action that unfocuses the node. |
static int |
ACTION_CLEAR_SELECTION
Action that unselects the node. |
static int |
ACTION_FOCUS
Action that focuses the node. |
static int |
ACTION_SELECT
Action that selects the node. |
| Constructor Summary | |
|---|---|
AccessibilityNodeInfoCompat(Object info)
|
|
| Method Summary | |
|---|---|
void |
addAction(int action)
Adds an action that can be performed on the node. |
void |
addChild(android.view.View child)
Adds a child. |
boolean |
equals(Object obj)
|
List<AccessibilityNodeInfoCompat> |
findAccessibilityNodeInfosByText(String text)
Finds AccessibilityNodeInfos by text. |
int |
getActions()
Gets the actions that can be performed on the node. |
void |
getBoundsInParent(android.graphics.Rect outBounds)
Gets the node bounds in parent coordinates. |
void |
getBoundsInScreen(android.graphics.Rect outBounds)
Gets the node bounds in screen coordinates. |
AccessibilityNodeInfoCompat |
getChild(int index)
Get the child at given index. |
int |
getChildCount()
Gets the number of children. |
CharSequence |
getClassName()
Gets the class this node comes from. |
CharSequence |
getContentDescription()
Gets the content description of this node. |
Object |
getImpl()
|
CharSequence |
getPackageName()
Gets the package this node comes from. |
AccessibilityNodeInfoCompat |
getParent()
Gets the parent. |
CharSequence |
getText()
Gets the text of this node. |
int |
getWindowId()
Gets the id of the window from which the info comes from. |
int |
hashCode()
|
boolean |
isCheckable()
Gets whether this node is checkable. |
boolean |
isChecked()
Gets whether this node is checked. |
boolean |
isClickable()
Gets whether this node is clickable. |
boolean |
isEnabled()
Gets whether this node is enabled. |
boolean |
isFocusable()
Gets whether this node is focusable. |
boolean |
isFocused()
Gets whether this node is focused. |
boolean |
isLongClickable()
Gets whether this node is long clickable. |
boolean |
isPassword()
Gets whether this node is a password. |
boolean |
isScrollable()
Gets if the node is scrollable. |
boolean |
isSelected()
Gets whether this node is selected. |
static AccessibilityNodeInfoCompat |
obtain()
Returns a cached instance if such is available otherwise a new one. |
static AccessibilityNodeInfoCompat |
obtain(AccessibilityNodeInfoCompat info)
Returns a cached instance if such is available or a new one is create. |
static AccessibilityNodeInfoCompat |
obtain(android.view.View source)
Returns a cached instance if such is available otherwise a new one and sets the source. |
boolean |
performAction(int action)
Performs an action on the node. |
void |
recycle()
Return an instance back to be reused. |
void |
setBoundsInParent(android.graphics.Rect bounds)
Sets the node bounds in parent coordinates. |
void |
setBoundsInScreen(android.graphics.Rect bounds)
Sets the node bounds in screen coordinates. |
void |
setCheckable(boolean checkable)
Sets whether this node is checkable. |
void |
setChecked(boolean checked)
Sets whether this node is checked. |
void |
setClassName(CharSequence className)
Sets the class this node comes from. |
void |
setClickable(boolean clickable)
Sets whether this node is clickable. |
void |
setContentDescription(CharSequence contentDescription)
Sets the content description of this node. |
void |
setEnabled(boolean enabled)
Sets whether this node is enabled. |
void |
setFocusable(boolean focusable)
Sets whether this node is focusable. |
void |
setFocused(boolean focused)
Sets whether this node is focused. |
void |
setLongClickable(boolean longClickable)
Sets whether this node is long clickable. |
void |
setPackageName(CharSequence packageName)
Sets the package this node comes from. |
void |
setParent(android.view.View parent)
Sets the parent. |
void |
setPassword(boolean password)
Sets whether this node is a password. |
void |
setScrollable(boolean scrollable)
Sets if the node is scrollable. |
void |
setSelected(boolean selected)
Sets whether this node is selected. |
void |
setSource(android.view.View source)
Sets the source. |
void |
setText(CharSequence text)
Sets the text of this node. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int ACTION_FOCUS
public static final int ACTION_CLEAR_FOCUS
public static final int ACTION_SELECT
public static final int ACTION_CLEAR_SELECTION
| Constructor Detail |
|---|
public AccessibilityNodeInfoCompat(Object info)
| Method Detail |
|---|
public Object getImpl()
public static AccessibilityNodeInfoCompat obtain(android.view.View source)
setSource(View)public static AccessibilityNodeInfoCompat obtain()
public static AccessibilityNodeInfoCompat obtain(AccessibilityNodeInfoCompat info)
info.
info - The other info.
public void setSource(android.view.View source)
source - The info source.public int getWindowId()
public int getChildCount()
public AccessibilityNodeInfoCompat getChild(int index)
Note: It is a client responsibility to recycle the
received info by calling recycle() to
avoid creating of multiple instances.
index - The child index.
IllegalStateException - If called outside of an
AccessibilityService.public void addChild(android.view.View child)
Note: Cannot be called from an
AccessibilityService. This class is
made immutable before being delivered to an AccessibilityService.
child - The child.
IllegalStateException - If called from an AccessibilityService.public int getActions()
AccessibilityNodeInfo.ACTION_FOCUS,
AccessibilityNodeInfo.ACTION_CLEAR_FOCUS,
AccessibilityNodeInfo.ACTION_SELECT,
AccessibilityNodeInfo.ACTION_CLEAR_SELECTIONpublic void addAction(int action)
Note: Cannot be called from an
AccessibilityService. This class is
made immutable before being delivered to an AccessibilityService.
action - The action.
IllegalStateException - If called from an AccessibilityService.public boolean performAction(int action)
Note: An action can be performed only if the request is
made from an AccessibilityService.
action - The action to perform.
IllegalStateException - If called outside of an
AccessibilityService.public List<AccessibilityNodeInfoCompat> findAccessibilityNodeInfosByText(String text)
AccessibilityNodeInfos 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 AccessibilityNodeInfo.recycle()
to avoid creating of multiple instances.
text - The searched text.
public AccessibilityNodeInfoCompat getParent()
Note: It is a client responsibility to recycle the
received info by calling AccessibilityNodeInfo.recycle()
to avoid creating of multiple instances.
public void setParent(android.view.View parent)
Note: Cannot be called from an
AccessibilityService. This class is
made immutable before being delivered to an AccessibilityService.
parent - The parent.
IllegalStateException - If called from an AccessibilityService.public void getBoundsInParent(android.graphics.Rect outBounds)
outBounds - The output node bounds.public void setBoundsInParent(android.graphics.Rect bounds)
Note: Cannot be called from an
AccessibilityService. This class is
made immutable before being delivered to an AccessibilityService.
bounds - The node bounds.
IllegalStateException - If called from an AccessibilityService.public void getBoundsInScreen(android.graphics.Rect outBounds)
outBounds - The output node bounds.public void setBoundsInScreen(android.graphics.Rect bounds)
Note: Cannot be called from an
AccessibilityService. This class is
made immutable before being delivered to an AccessibilityService.
bounds - The node bounds.
IllegalStateException - If called from an AccessibilityService.public boolean isCheckable()
public void setCheckable(boolean checkable)
Note: Cannot be called from an
AccessibilityService. This class is
made immutable before being delivered to an AccessibilityService.
checkable - True if the node is checkable.
IllegalStateException - If called from an AccessibilityService.public boolean isChecked()
public void setChecked(boolean checked)
Note: Cannot be called from an
AccessibilityService. This class is
made immutable before being delivered to an AccessibilityService.
checked - True if the node is checked.
IllegalStateException - If called from an AccessibilityService.public boolean isFocusable()
public void setFocusable(boolean focusable)
Note: Cannot be called from an
AccessibilityService. This class is
made immutable before being delivered to an AccessibilityService.
focusable - True if the node is focusable.
IllegalStateException - If called from an AccessibilityService.public boolean isFocused()
public void setFocused(boolean focused)
Note: Cannot be called from an
AccessibilityService. This class is
made immutable before being delivered to an AccessibilityService.
focused - True if the node is focused.
IllegalStateException - If called from an AccessibilityService.public boolean isSelected()
public void setSelected(boolean selected)
Note: Cannot be called from an
AccessibilityService. This class is
made immutable before being delivered to an AccessibilityService.
selected - True if the node is selected.
IllegalStateException - If called from an AccessibilityService.public boolean isClickable()
public void setClickable(boolean clickable)
Note: Cannot be called from an
AccessibilityService. This class is
made immutable before being delivered to an AccessibilityService.
clickable - True if the node is clickable.
IllegalStateException - If called from an AccessibilityService.public boolean isLongClickable()
public void setLongClickable(boolean longClickable)
Note: Cannot be called from an
AccessibilityService. This class is
made immutable before being delivered to an AccessibilityService.
longClickable - True if the node is long clickable.
IllegalStateException - If called from an AccessibilityService.public boolean isEnabled()
public void setEnabled(boolean enabled)
Note: Cannot be called from an
AccessibilityService. This class is
made immutable before being delivered to an AccessibilityService.
enabled - True if the node is enabled.
IllegalStateException - If called from an AccessibilityService.public boolean isPassword()
public void setPassword(boolean password)
Note: Cannot be called from an
AccessibilityService. This class is
made immutable before being delivered to an AccessibilityService.
password - True if the node is a password.
IllegalStateException - If called from an AccessibilityService.public boolean isScrollable()
public void setScrollable(boolean scrollable)
Note: Cannot be called from an
AccessibilityService. This class is
made immutable before being delivered to an AccessibilityService.
scrollable - True if the node is scrollable, false otherwise.
IllegalStateException - If called from an AccessibilityService.public CharSequence getPackageName()
public void setPackageName(CharSequence packageName)
Note: Cannot be called from an
AccessibilityService. This class is
made immutable before being delivered to an AccessibilityService.
packageName - The package name.
IllegalStateException - If called from an AccessibilityService.public CharSequence getClassName()
public void setClassName(CharSequence className)
Note: Cannot be called from an
AccessibilityService. This class is
made immutable before being delivered to an AccessibilityService.
className - The class name.
IllegalStateException - If called from an AccessibilityService.public CharSequence getText()
public void setText(CharSequence text)
Note: Cannot be called from an
AccessibilityService. This class is
made immutable before being delivered to an AccessibilityService.
text - The text.
IllegalStateException - If called from an AccessibilityService.public CharSequence getContentDescription()
public void setContentDescription(CharSequence contentDescription)
Note: Cannot be called from an
AccessibilityService. This class is
made immutable before being delivered to an AccessibilityService.
contentDescription - The content description.
IllegalStateException - If called from an AccessibilityService.public void recycle()
Note: You must not touch the object after calling this function.
IllegalStateException - If the info is already recycled.public int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||