public static class A11yNodeInfo.Matcher
extends java.lang.Object
Constructor and Description |
---|
Matcher()
Create an empty matcher.
|
Modifier and Type | Method and Description |
---|---|
boolean |
match(A11yNodeInfo nodeInfo)
Perform the matching process.
|
A11yNodeInfo.Matcher |
setClass(java.lang.Class<? extends android.view.View> clazz)
Set the class for the view type associated with the control.
|
A11yNodeInfo.Matcher |
setContentDescription(java.lang.String contentDescription)
Match based on content description (contentEquals) check.
|
A11yNodeInfo.Matcher |
setPositionContainedIn(android.graphics.Rect rect)
Match based on the position on screen.
|
A11yNodeInfo.Matcher |
setPositionEqualTo(android.graphics.Rect rect)
Match based on position on screen, triggered when the rectangle is the same rectangle is the node.
|
A11yNodeInfo.Matcher |
setText(java.lang.String text)
Match based on the text of the node.
|
A11yNodeInfo.Matcher |
setViewIdResourceName(java.lang.String viewIdResourceName)
Match based on the view id resource name.
|
java.lang.String |
toString() |
public Matcher()
public A11yNodeInfo.Matcher setContentDescription(java.lang.String contentDescription)
contentDescription
- The content description.public A11yNodeInfo.Matcher setClass(java.lang.Class<? extends android.view.View> clazz)
clazz
- The class to match.public A11yNodeInfo.Matcher setPositionContainedIn(android.graphics.Rect rect)
rect
- The containing rectangle.public A11yNodeInfo.Matcher setPositionEqualTo(android.graphics.Rect rect)
rect
- The rectangle.public A11yNodeInfo.Matcher setText(java.lang.String text)
text
- The text to compare against.public A11yNodeInfo.Matcher setViewIdResourceName(java.lang.String viewIdResourceName)
viewIdResourceName
- The resource name.public boolean match(A11yNodeInfo nodeInfo)
nodeInfo
- public java.lang.String toString()
toString
in class java.lang.Object