blob: 7405f3b6d8e43b57671e1dd0fe1c798fff85e3f7 [file] [log] [blame]
page.title=UiScrollable
parent.title=uiautomator
parent.link=index.html
@jd:body
<style>
h4.jd-details-title {background-color: #DEE8F1;}
</style>
<p>A <code><a href="UiCollection.html">UiCollection</a></code>
that supports searching for items in scrollable layout elements. This class can
be used with horizontally or vertically scrollable controls.</p>
<h2>Summary</h2>
<!-- =========== ENUM CONSTANT SUMMARY =========== -->
<table id="inhconstants" class="jd-sumtable"><tr><th>
<a href="#" class="toggle-all" onclick="return toggleAllInherited(this, null)">[Expand]</a>
<div style="clear:left;">Inherited Constants</div></th></tr>
<tr class="api" >
<td colspan="12">
<a href="#" onclick="return toggleInherited(this, null)" id="inherited-constants-com.android.uiautomator.core.UiObject" class="jd-expando-trigger closed"
><img id="inherited-constants-com.android.uiautomator.core.UiObject-trigger"
src="../../../../../assets/images/triangle-closed.png"
class="jd-expando-trigger-img" /></a>From class
<a href="UiObject.html">com.android.uiautomator.core.UiObject</a>
<div id="inherited-constants-com.android.uiautomator.core.UiObject">
<div id="inherited-constants-com.android.uiautomator.core.UiObject-list"
class="jd-inheritedlinks">
</div>
<div id="inherited-constants-com.android.uiautomator.core.UiObject-summary" style="display: none;">
<table class="jd-sumtable-expando">
<tr class="api" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="UiObject.html#FINGER_TOUCH_HALF_WIDTH">FINGER_TOUCH_HALF_WIDTH</a></td>
<td class="jd-descrcol" width="100%"></td>
</tr>
<tr class="api" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="UiObject.html#SWIPE_MARGIN_LIMIT">SWIPE_MARGIN_LIMIT</a></td>
<td class="jd-descrcol" width="100%"></td>
</tr>
<tr class="api" >
<td class="jd-typecol">long</td>
<td class="jd-linkcol"><a href="UiObject.html#WAIT_FOR_EVENT_TMEOUT">WAIT_FOR_EVENT_TMEOUT</a></td>
<td class="jd-descrcol" width="100%"><em>
This constant is deprecated.
use <code><a href="Configurator.html#setScrollAcknowledgmentTimeout(long)">setScrollAcknowledgmentTimeout(long)</a></code>
</em></td>
</tr>
<tr class="api" >
<td class="jd-typecol">long</td>
<td class="jd-linkcol"><a href="UiObject.html#WAIT_FOR_SELECTOR_POLL">WAIT_FOR_SELECTOR_POLL</a></td>
<td class="jd-descrcol" width="100%"></td>
</tr>
<tr class="api" >
<td class="jd-typecol">long</td>
<td class="jd-linkcol"><a href="UiObject.html#WAIT_FOR_SELECTOR_TIMEOUT">WAIT_FOR_SELECTOR_TIMEOUT</a></td>
<td class="jd-descrcol" width="100%"><em>
This constant is deprecated.
use <code><a href="Configurator.html#setWaitForSelectorTimeout(long)">setWaitForSelectorTimeout(long)</a></code>
</em></td>
</tr>
<tr class="api" >
<td class="jd-typecol">long</td>
<td class="jd-linkcol"><a href="UiObject.html#WAIT_FOR_WINDOW_TMEOUT">WAIT_FOR_WINDOW_TMEOUT</a></td>
<td class="jd-descrcol" width="100%"></td>
</tr>
</table>
</div>
</div>
</td></tr>
</table>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<table id="pubctors" class="jd-sumtable"><tr><th colspan="12">Public Constructors</th></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="#UiScrollable(com.android.uiautomator.core.UiSelector)">UiScrollable</a></span>(<a href="UiSelector.html">UiSelector</a> container)</nobr>
<div class="jd-descrdiv">Constructor.</div>
</td></tr>
</table>
<!-- ========== METHOD SUMMARY =========== -->
<table id="pubmethods" class="jd-sumtable"><tr><th colspan="12">Public Methods</th></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="#flingBackward()">flingBackward</a></span>()</nobr>
<div class="jd-descrdiv">Performs a backwards fling action with the default number of fling
steps (5).</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="#flingForward()">flingForward</a></span>()</nobr>
<div class="jd-descrdiv">Performs a forward fling with the default number of fling steps (5).</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="#flingToBeginning(int)">flingToBeginning</a></span>(int maxSwipes)</nobr>
<div class="jd-descrdiv">Performs a fling gesture to reach the beginning of a scrollable layout element.</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="#flingToEnd(int)">flingToEnd</a></span>(int maxSwipes)</nobr>
<div class="jd-descrdiv">Performs a fling gesture to reach the end of a scrollable layout element.</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
<a href="UiObject.html">UiObject</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="#getChildByDescription(com.android.uiautomator.core.UiSelector, java.lang.String, boolean)">getChildByDescription</a></span>(<a href="UiSelector.html">UiSelector</a> childPattern, String text, boolean allowScrollSearch)</nobr>
<div class="jd-descrdiv">Searches for a child element in the present scrollable container.</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
<a href="UiObject.html">UiObject</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="#getChildByDescription(com.android.uiautomator.core.UiSelector, java.lang.String)">getChildByDescription</a></span>(<a href="UiSelector.html">UiSelector</a> childPattern, String text)</nobr>
<div class="jd-descrdiv">Searches for a child element in the present scrollable container.</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
<a href="UiObject.html">UiObject</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="#getChildByInstance(com.android.uiautomator.core.UiSelector, int)">getChildByInstance</a></span>(<a href="UiSelector.html">UiSelector</a> childPattern, int instance)</nobr>
<div class="jd-descrdiv">Searches for a child element in the present scrollable container that
matches the selector you provided.</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
<a href="UiObject.html">UiObject</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="#getChildByText(com.android.uiautomator.core.UiSelector, java.lang.String, boolean)">getChildByText</a></span>(<a href="UiSelector.html">UiSelector</a> childPattern, String text, boolean allowScrollSearch)</nobr>
<div class="jd-descrdiv">Searches for a child element in the present scrollable container.</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
<a href="UiObject.html">UiObject</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="#getChildByText(com.android.uiautomator.core.UiSelector, java.lang.String)">getChildByText</a></span>(<a href="UiSelector.html">UiSelector</a> childPattern, String text)</nobr>
<div class="jd-descrdiv">Searches for a child element in the present scrollable
container.</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
int</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="#getMaxSearchSwipes()">getMaxSearchSwipes</a></span>()</nobr>
<div class="jd-descrdiv">Gets the maximum number of scrolls allowed when performing a
scroll action in search of a child element.</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
double</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="#getSwipeDeadZonePercentage()">getSwipeDeadZonePercentage</a></span>()</nobr>
<div class="jd-descrdiv">Returns the percentage of a widget's size that's considered as a no-touch
zone when swiping.</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="#scrollBackward(int)">scrollBackward</a></span>(int steps)</nobr>
<div class="jd-descrdiv">Performs a backward scroll.</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="#scrollBackward()">scrollBackward</a></span>()</nobr>
<div class="jd-descrdiv">Performs a backward scroll with the default number of scroll steps (55).</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="#scrollDescriptionIntoView(java.lang.String)">scrollDescriptionIntoView</a></span>(String text)</nobr>
<div class="jd-descrdiv">Performs a forward scroll action on the scrollable layout element until
the content-description is found, or until swipe attempts have been exhausted.</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="#scrollForward()">scrollForward</a></span>()</nobr>
<div class="jd-descrdiv">Performs a forward scroll with the default number of scroll steps (55).</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="#scrollForward(int)">scrollForward</a></span>(int steps)</nobr>
<div class="jd-descrdiv">Performs a forward scroll.</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="#scrollIntoView(com.android.uiautomator.core.UiSelector)">scrollIntoView</a></span>(<a href="UiSelector.html">UiSelector</a> selector)</nobr>
<div class="jd-descrdiv">Perform a scroll forward action to move through the scrollable layout
element until a visible item that matches the selector is found.</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="#scrollIntoView(com.android.uiautomator.core.UiObject)">scrollIntoView</a></span>(<a href="UiObject.html">UiObject</a> obj)</nobr>
<div class="jd-descrdiv">Perform a forward scroll action to move through the scrollable layout element until
a visible item that matches the <code><a href="UiObject.html">UiObject</a></code> is found.</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="#scrollTextIntoView(java.lang.String)">scrollTextIntoView</a></span>(String text)</nobr>
<div class="jd-descrdiv">Performs a forward scroll action on the scrollable layout element until
the text you provided is visible, or until swipe attempts have been exhausted.</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="#scrollToBeginning(int)">scrollToBeginning</a></span>(int maxSwipes)</nobr>
<div class="jd-descrdiv">Scrolls to the beginning of a scrollable layout element.</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="#scrollToBeginning(int, int)">scrollToBeginning</a></span>(int maxSwipes, int steps)</nobr>
<div class="jd-descrdiv">Scrolls to the beginning of a scrollable layout element.</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="#scrollToEnd(int, int)">scrollToEnd</a></span>(int maxSwipes, int steps)</nobr>
<div class="jd-descrdiv">Scrolls to the end of a scrollable layout element.</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="#scrollToEnd(int)">scrollToEnd</a></span>(int maxSwipes)</nobr>
<div class="jd-descrdiv">Scrolls to the end of a scrollable layout element.</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
<a href="#">UiScrollable</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="#setAsHorizontalList()">setAsHorizontalList</a></span>()</nobr>
<div class="jd-descrdiv">Set the direction of swipes to be horizontal when performing scroll actions.</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
<a href="#">UiScrollable</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="#setAsVerticalList()">setAsVerticalList</a></span>()</nobr>
<div class="jd-descrdiv">Set the direction of swipes to be vertical when performing scroll actions.</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
<a href="#">UiScrollable</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="#setMaxSearchSwipes(int)">setMaxSearchSwipes</a></span>(int swipes)</nobr>
<div class="jd-descrdiv">Sets the maximum number of scrolls allowed when performing a
scroll action in search of a child element.</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
<a href="#">UiScrollable</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="#setSwipeDeadZonePercentage(double)">setSwipeDeadZonePercentage</a></span>(double swipeDeadZonePercentage)</nobr>
<div class="jd-descrdiv">Sets the percentage of a widget's size that's considered as no-touch
zone when swiping.</div>
</td></tr>
</table>
<!-- ========== METHOD SUMMARY =========== -->
<table id="promethods" class="jd-sumtable"><tr><th colspan="12">Protected Methods</th></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="#exists(com.android.uiautomator.core.UiSelector)">exists</a></span>(<a href="UiSelector.html">UiSelector</a> selector)</nobr>
<div class="jd-descrdiv">Used privately when performing swipe searches to decide if an element has become
visible or not.</div>
</td></tr>
</table>
<!-- ========== METHOD SUMMARY =========== -->
<table id="inhmethods" class="jd-sumtable"><tr><th>
<a href="#" class="toggle-all" onclick="return toggleAllInherited(this, null)">[Expand]</a>
<div style="clear:left;">Inherited Methods</div></th></tr>
<tr class="api" >
<td colspan="12">
<a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-com.android.uiautomator.core.UiCollection" class="jd-expando-trigger closed"
><img id="inherited-methods-com.android.uiautomator.core.UiCollection-trigger"
src="../../../../../assets/images/triangle-closed.png"
class="jd-expando-trigger-img" /></a>
From class
<a href="UiCollection.html">com.android.uiautomator.core.UiCollection</a>
<div id="inherited-methods-com.android.uiautomator.core.UiCollection">
<div id="inherited-methods-com.android.uiautomator.core.UiCollection-list"
class="jd-inheritedlinks">
</div>
<div id="inherited-methods-com.android.uiautomator.core.UiCollection-summary" style="display: none;">
<table class="jd-sumtable-expando">
<tr class="api" >
<td class="jd-typecol"><nobr>
<a href="UiObject.html">UiObject</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="UiCollection.html#getChildByDescription(com.android.uiautomator.core.UiSelector, java.lang.String)">getChildByDescription</a></span>(<a href="UiSelector.html">UiSelector</a> childPattern, String text)</nobr>
<div class="jd-descrdiv">Searches for child UI element within the constraints of this UiCollection <code><a href="UiSelector.html">UiSelector</a></code>
selector.</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
<a href="UiObject.html">UiObject</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="UiCollection.html#getChildByInstance(com.android.uiautomator.core.UiSelector, int)">getChildByInstance</a></span>(<a href="UiSelector.html">UiSelector</a> childPattern, int instance)</nobr>
<div class="jd-descrdiv">Searches for child UI element within the constraints of this UiCollection <code><a href="UiSelector.html">UiSelector</a></code>
selector.</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
<a href="UiObject.html">UiObject</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="UiCollection.html#getChildByText(com.android.uiautomator.core.UiSelector, java.lang.String)">getChildByText</a></span>(<a href="UiSelector.html">UiSelector</a> childPattern, String text)</nobr>
<div class="jd-descrdiv">Searches for child UI element within the constraints of this UiCollection <code><a href="UiSelector.html">UiSelector</a></code>
selector.</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
int</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="UiCollection.html#getChildCount(com.android.uiautomator.core.UiSelector)">getChildCount</a></span>(<a href="UiSelector.html">UiSelector</a> childPattern)</nobr>
<div class="jd-descrdiv">Counts child UI element instances matching the <code>childPattern</code>
argument.</div>
</td></tr>
</table>
</div>
</div>
</td></tr>
<tr class="api" >
<td colspan="12">
<a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-com.android.uiautomator.core.UiObject" class="jd-expando-trigger closed"
><img id="inherited-methods-com.android.uiautomator.core.UiObject-trigger"
src="../../../../../assets/images/triangle-closed.png"
class="jd-expando-trigger-img" /></a>
From class
<a href="UiObject.html">com.android.uiautomator.core.UiObject</a>
<div id="inherited-methods-com.android.uiautomator.core.UiObject">
<div id="inherited-methods-com.android.uiautomator.core.UiObject-list"
class="jd-inheritedlinks">
</div>
<div id="inherited-methods-com.android.uiautomator.core.UiObject-summary" style="display: none;">
<table class="jd-sumtable-expando">
<tr class="api" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="UiObject.html#clearTextField()">clearTextField</a></span>()</nobr>
<div class="jd-descrdiv">Clears the existing text contents in an editable field.</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="UiObject.html#click()">click</a></span>()</nobr>
<div class="jd-descrdiv">Performs a click at the center of the visible bounds of the UI element represented
by this UiObject.</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="UiObject.html#clickAndWaitForNewWindow(long)">clickAndWaitForNewWindow</a></span>(long timeout)</nobr>
<div class="jd-descrdiv">Performs a click at the center of the visible bounds of the UI element represented
by this UiObject and waits for window transitions.</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="UiObject.html#clickAndWaitForNewWindow()">clickAndWaitForNewWindow</a></span>()</nobr>
<div class="jd-descrdiv">Waits for window transitions that would typically take longer than the
usual default timeouts.</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="UiObject.html#clickBottomRight()">clickBottomRight</a></span>()</nobr>
<div class="jd-descrdiv">Clicks the bottom and right corner of the UI element</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="UiObject.html#clickTopLeft()">clickTopLeft</a></span>()</nobr>
<div class="jd-descrdiv">Clicks the top and left corner of the UI element</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="UiObject.html#dragTo(com.android.uiautomator.core.UiObject, int)">dragTo</a></span>(<a href="UiObject.html">UiObject</a> destObj, int steps)</nobr>
<div class="jd-descrdiv">Drags this object to a destination UiObject.</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="UiObject.html#dragTo(int, int, int)">dragTo</a></span>(int destX, int destY, int steps)</nobr>
<div class="jd-descrdiv">Drags this object to arbitrary coordinates.</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="UiObject.html#exists()">exists</a></span>()</nobr>
<div class="jd-descrdiv">Check if view exists.</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
AccessibilityNodeInfo</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="UiObject.html#findAccessibilityNodeInfo(long)">findAccessibilityNodeInfo</a></span>(long timeout)</nobr>
<div class="jd-descrdiv">Finds a matching UI element in the accessibility hierarchy, by
using the selector for this UiObject.</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
Rect</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="UiObject.html#getBounds()">getBounds</a></span>()</nobr>
<div class="jd-descrdiv">Returns the view's <code>bounds</code> property.</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
<a href="UiObject.html">UiObject</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="UiObject.html#getChild(com.android.uiautomator.core.UiSelector)">getChild</a></span>(<a href="UiSelector.html">UiSelector</a> selector)</nobr>
<div class="jd-descrdiv">Creates a new UiObject for a child view that is under the present UiObject.</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
int</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="UiObject.html#getChildCount()">getChildCount</a></span>()</nobr>
<div class="jd-descrdiv">Counts the child views immediately under the present UiObject.</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
String</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="UiObject.html#getClassName()">getClassName</a></span>()</nobr>
<div class="jd-descrdiv">Retrieves the <code>className</code> property of the UI element.</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
String</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="UiObject.html#getContentDescription()">getContentDescription</a></span>()</nobr>
<div class="jd-descrdiv">Reads the <code>content_desc</code> property of the UI element</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
<a href="UiObject.html">UiObject</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="UiObject.html#getFromParent(com.android.uiautomator.core.UiSelector)">getFromParent</a></span>(<a href="UiSelector.html">UiSelector</a> selector)</nobr>
<div class="jd-descrdiv">Creates a new UiObject for a sibling view or a child of the sibling view,
relative to the present UiObject.</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
String</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="UiObject.html#getPackageName()">getPackageName</a></span>()</nobr>
<div class="jd-descrdiv">Reads the view's <code>package</code> property</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
final
<a href="UiSelector.html">UiSelector</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="UiObject.html#getSelector()">getSelector</a></span>()</nobr>
<div class="jd-descrdiv">Debugging helper.</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
String</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="UiObject.html#getText()">getText</a></span>()</nobr>
<div class="jd-descrdiv">Reads the <code>text</code> property of the UI element</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
Rect</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="UiObject.html#getVisibleBounds()">getVisibleBounds</a></span>()</nobr>
<div class="jd-descrdiv">Returns the visible bounds of the view.</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="UiObject.html#isCheckable()">isCheckable</a></span>()</nobr>
<div class="jd-descrdiv">Checks if the UI element's <code>checkable</code> property is currently true.</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="UiObject.html#isChecked()">isChecked</a></span>()</nobr>
<div class="jd-descrdiv">Check if the UI element's <code>checked</code> property is currently true</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="UiObject.html#isClickable()">isClickable</a></span>()</nobr>
<div class="jd-descrdiv">Checks if the UI element's <code>clickable</code> property is currently true.</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="UiObject.html#isEnabled()">isEnabled</a></span>()</nobr>
<div class="jd-descrdiv">Checks if the UI element's <code>enabled</code> property is currently true.</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="UiObject.html#isFocusable()">isFocusable</a></span>()</nobr>
<div class="jd-descrdiv">Check if the UI element's <code>focusable</code> property is currently true.</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="UiObject.html#isFocused()">isFocused</a></span>()</nobr>
<div class="jd-descrdiv">Check if the UI element's <code>focused</code> property is currently true</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="UiObject.html#isLongClickable()">isLongClickable</a></span>()</nobr>
<div class="jd-descrdiv">Check if the view's <code>long-clickable</code> property is currently true</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="UiObject.html#isScrollable()">isScrollable</a></span>()</nobr>
<div class="jd-descrdiv">Check if the view's <code>scrollable</code> property is currently true</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="UiObject.html#isSelected()">isSelected</a></span>()</nobr>
<div class="jd-descrdiv">Checks if the UI element's <code>selected</code> property is currently true.</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="UiObject.html#longClick()">longClick</a></span>()</nobr>
<div class="jd-descrdiv">Long clicks the center of the visible bounds of the UI element</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="UiObject.html#longClickBottomRight()">longClickBottomRight</a></span>()</nobr>
<div class="jd-descrdiv">Long clicks bottom and right corner of the UI element</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="UiObject.html#longClickTopLeft()">longClickTopLeft</a></span>()</nobr>
<div class="jd-descrdiv">Long clicks on the top and left corner of the UI element</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="UiObject.html#performMultiPointerGesture(android.view.MotionEvent.PointerCoords[]...)">performMultiPointerGesture</a></span>(PointerCoords... touches)</nobr>
<div class="jd-descrdiv">Performs a multi-touch gesture.</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="UiObject.html#performTwoPointerGesture(android.graphics.Point, android.graphics.Point, android.graphics.Point, android.graphics.Point, int)">performTwoPointerGesture</a></span>(Point startPoint1, Point startPoint2, Point endPoint1, Point endPoint2, int steps)</nobr>
<div class="jd-descrdiv">Generates a two-pointer gesture with arbitrary starting and ending points.</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="UiObject.html#pinchIn(int, int)">pinchIn</a></span>(int percent, int steps)</nobr>
<div class="jd-descrdiv">Performs a two-pointer gesture, where each pointer moves diagonally
toward the other, from the edges to the center of this UiObject .</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="UiObject.html#pinchOut(int, int)">pinchOut</a></span>(int percent, int steps)</nobr>
<div class="jd-descrdiv">Performs a two-pointer gesture, where each pointer moves diagonally
opposite across the other, from the center out towards the edges of the
this UiObject.</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="UiObject.html#setText(java.lang.String)">setText</a></span>(String text)</nobr>
<div class="jd-descrdiv">Sets the text in an editable field, after clearing the field's content.</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="UiObject.html#swipeDown(int)">swipeDown</a></span>(int steps)</nobr>
<div class="jd-descrdiv">Performs the swipe down action on the UiObject.</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="UiObject.html#swipeLeft(int)">swipeLeft</a></span>(int steps)</nobr>
<div class="jd-descrdiv">Performs the swipe left action on the UiObject.</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="UiObject.html#swipeRight(int)">swipeRight</a></span>(int steps)</nobr>
<div class="jd-descrdiv">Performs the swipe right action on the UiObject.</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="UiObject.html#swipeUp(int)">swipeUp</a></span>(int steps)</nobr>
<div class="jd-descrdiv">Performs the swipe up action on the UiObject.</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="UiObject.html#waitForExists(long)">waitForExists</a></span>(long timeout)</nobr>
<div class="jd-descrdiv">Waits a specified length of time for a view to become visible.</div>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="UiObject.html#waitUntilGone(long)">waitUntilGone</a></span>(long timeout)</nobr>
<div class="jd-descrdiv">Waits a specified length of time for a view to become undetectable.</div>
</td></tr>
</table>
</div>
</div>
</td></tr>
<tr class="api" >
<td colspan="12">
<a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-java.lang.Object" class="jd-expando-trigger closed"
><img id="inherited-methods-java.lang.Object-trigger"
src="../../../../../assets/images/triangle-closed.png"
class="jd-expando-trigger-img" /></a>
From class
java.lang.Object
<div id="inherited-methods-java.lang.Object">
<div id="inherited-methods-java.lang.Object-list"
class="jd-inheritedlinks">
</div>
<div id="inherited-methods-java.lang.Object-summary" style="display: none;">
<table class="jd-sumtable-expando">
<tr class="api" >
<td class="jd-typecol"><nobr>
Object</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad">clone</span>()</nobr>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad">equals</span>(Object arg0)</nobr>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad">finalize</span>()</nobr>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
final
Class&lt;?&gt;</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad">getClass</span>()</nobr>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
int</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad">hashCode</span>()</nobr>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
final
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad">notify</span>()</nobr>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
final
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad">notifyAll</span>()</nobr>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
String</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad">toString</span>()</nobr>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
final
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad">wait</span>()</nobr>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
final
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad">wait</span>(long arg0, int arg1)</nobr>
</td></tr>
<tr class="api" >
<td class="jd-typecol"><nobr>
final
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad">wait</span>(long arg0)</nobr>
</td></tr>
</table>
</div>
</div>
</td></tr>
</table>
</div><!-- jd-descr (summary) -->
<!-- Details -->
<!-- XML Attributes -->
<!-- Enum Values -->
<!-- Constants -->
<!-- Fields -->
<!-- Public ctors -->
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<h2>Public Constructors</h2>
<A NAME="UiScrollable(com.android.uiautomator.core.UiSelector)"></A>
<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
public
</span>
<span class="sympad">UiScrollable</span>
<span class="normal">(<a href="UiSelector.html">UiSelector</a> container)</span>
</h4>
<div class="api-level">
<div></div>
</div>
<div class="jd-details-descr">
<div class="jd-tagdata jd-tagdescr"><p>Constructor.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
<th>container</td>
<td>a <code><a href="UiSelector.html">UiSelector</a></code> selector to identify the scrollable
layout element.</td>
</tr>
</table>
</div>
</div>
</div>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<!-- Protected ctors -->
<!-- ========= METHOD DETAIL ======== -->
<!-- Public methdos -->
<h2>Public Methods</h2>
<A NAME="flingBackward()"></A>
<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
public
boolean
</span>
<span class="sympad">flingBackward</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
<div></div>
</div>
<div class="jd-details-descr">
<div class="jd-tagdata jd-tagdescr"><p>Performs a backwards fling action with the default number of fling
steps (5). If the swipe direction is set to vertical,
then the swipe will be performed from top to bottom. If the swipe
direction is set to horizontal, then the swipes will be performed from
left to right. Make sure to take into account devices configured with
right-to-left languages like Arabic and Hebrew.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
<ul class="nolist"><li>true if scrolled, and false if can't scroll anymore</li></ul>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
<table class="jd-tagtable">
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
</tr>
</table>
</div>
</div>
</div>
<A NAME="flingForward()"></A>
<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
public
boolean
</span>
<span class="sympad">flingForward</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
<div></div>
</div>
<div class="jd-details-descr">
<div class="jd-tagdata jd-tagdescr"><p>Performs a forward fling with the default number of fling steps (5).
If the swipe direction is set to vertical, then the swipes will be
performed from bottom to top. If the swipe
direction is set to horizontal, then the swipes will be performed from
right to left. Make sure to take into account devices configured with
right-to-left languages like Arabic and Hebrew.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
<ul class="nolist"><li>true if scrolled, false if can't scroll anymore</li></ul>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
<table class="jd-tagtable">
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
</tr>
</table>
</div>
</div>
</div>
<A NAME="flingToBeginning(int)"></A>
<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
public
boolean
</span>
<span class="sympad">flingToBeginning</span>
<span class="normal">(int maxSwipes)</span>
</h4>
<div class="api-level">
<div></div>
</div>
<div class="jd-details-descr">
<div class="jd-tagdata jd-tagdescr"><p>Performs a fling gesture to reach the beginning of a scrollable layout element.
The beginning can be at the top-most edge in the case of vertical controls, or
the left-most edge for horizontal controls. Make sure to take into
account devices configured with right-to-left languages like Arabic and Hebrew.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
<ul class="nolist"><li>true on scrolled else false</li></ul>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
<table class="jd-tagtable">
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
</tr>
</table>
</div>
</div>
</div>
<A NAME="flingToEnd(int)"></A>
<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
public
boolean
</span>
<span class="sympad">flingToEnd</span>
<span class="normal">(int maxSwipes)</span>
</h4>
<div class="api-level">
<div></div>
</div>
<div class="jd-details-descr">
<div class="jd-tagdata jd-tagdescr"><p>Performs a fling gesture to reach the end of a scrollable layout element.
The end can be at the bottom-most edge in the case of vertical controls, or
the right-most edge for horizontal controls. Make sure to take into
account devices configured with right-to-left languages like Arabic and Hebrew.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
<ul class="nolist"><li>true on scrolled, else false</li></ul>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
<table class="jd-tagtable">
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
</tr>
</table>
</div>
</div>
</div>
<A NAME="getChildByDescription(com.android.uiautomator.core.UiSelector, java.lang.String, boolean)"></A>
<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
public
<a href="UiObject.html">UiObject</a>
</span>
<span class="sympad">getChildByDescription</span>
<span class="normal">(<a href="UiSelector.html">UiSelector</a> childPattern, String text, boolean allowScrollSearch)</span>
</h4>
<div class="api-level">
<div></div>
</div>
<div class="jd-details-descr">
<div class="jd-tagdata jd-tagdescr"><p>Searches for a child element in the present scrollable container.
The search first looks for a child element that matches the selector
you provided, then looks for the content-description in its children elements.
If both search conditions are fulfilled, the method returns a {@ link UiObject}
representing the element matching the selector (not the child element in its
subhierarchy containing the content-description).</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
<th>childPattern</td>
<td><code><a href="UiSelector.html">UiSelector</a></code> for a child in a scollable layout element</td>
</tr>
<tr>
<th>text</td>
<td>Content-description to find in the children of
the <code>childPattern</code> match (may be a partial match)</td>
</tr>
<tr>
<th>allowScrollSearch</td>
<td>set to true if scrolling is allowed</td>
</tr>
</table>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
<ul class="nolist"><li><code><a href="UiObject.html">UiObject</a></code> representing the child element that matches the search conditions</li></ul>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
<table class="jd-tagtable">
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
</tr>
</table>
</div>
</div>
</div>
<A NAME="getChildByDescription(com.android.uiautomator.core.UiSelector, java.lang.String)"></A>
<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
public
<a href="UiObject.html">UiObject</a>
</span>
<span class="sympad">getChildByDescription</span>
<span class="normal">(<a href="UiSelector.html">UiSelector</a> childPattern, String text)</span>
</h4>
<div class="api-level">
<div></div>
</div>
<div class="jd-details-descr">
<div class="jd-tagdata jd-tagdescr"><p>Searches for a child element in the present scrollable container.
The search first looks for a child element that matches the selector
you provided, then looks for the content-description in its children elements.
If both search conditions are fulfilled, the method returns a {@ link UiObject}
representing the element matching the selector (not the child element in its
subhierarchy containing the content-description). By default, this method performs a
scroll search.
See <code><a href="#getChildByDescription(com.android.uiautomator.core.UiSelector, java.lang.String, boolean)">getChildByDescription(UiSelector, String, boolean)</a></code></p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
<th>childPattern</td>
<td><code><a href="UiSelector.html">UiSelector</a></code> for a child in a scollable layout element</td>
</tr>
<tr>
<th>text</td>
<td>Content-description to find in the children of
the <code>childPattern</code> match</td>
</tr>
</table>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
<ul class="nolist"><li><code><a href="UiObject.html">UiObject</a></code> representing the child element that matches the search conditions</li></ul>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
<table class="jd-tagtable">
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
</tr>
</table>
</div>
</div>
</div>
<A NAME="getChildByInstance(com.android.uiautomator.core.UiSelector, int)"></A>
<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
public
<a href="UiObject.html">UiObject</a>
</span>
<span class="sympad">getChildByInstance</span>
<span class="normal">(<a href="UiSelector.html">UiSelector</a> childPattern, int instance)</span>
</h4>
<div class="api-level">
<div></div>
</div>
<div class="jd-details-descr">
<div class="jd-tagdata jd-tagdescr"><p>Searches for a child element in the present scrollable container that
matches the selector you provided. The search is performed without
scrolling and only on visible elements.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
<th>childPattern</td>
<td><code><a href="UiSelector.html">UiSelector</a></code> for a child in a scollable layout element</td>
</tr>
<tr>
<th>instance</td>
<td>int number representing the occurance of
a <code>childPattern</code> match</td>
</tr>
</table>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
<ul class="nolist"><li><code><a href="UiObject.html">UiObject</a></code> representing the child element that matches the search conditions</li></ul>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
<table class="jd-tagtable">
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
</tr>
</table>
</div>
</div>
</div>
<A NAME="getChildByText(com.android.uiautomator.core.UiSelector, java.lang.String, boolean)"></A>
<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
public
<a href="UiObject.html">UiObject</a>
</span>
<span class="sympad">getChildByText</span>
<span class="normal">(<a href="UiSelector.html">UiSelector</a> childPattern, String text, boolean allowScrollSearch)</span>
</h4>
<div class="api-level">
<div></div>
</div>
<div class="jd-details-descr">
<div class="jd-tagdata jd-tagdescr"><p>Searches for a child element in the present scrollable container. The
search first looks for a child element that matches the
selector you provided, then looks for the text in its children elements.
If both search conditions are fulfilled, the method returns a {@ link UiObject}
representing the element matching the selector (not the child element in its
subhierarchy containing the text).</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
<th>childPattern</td>
<td><code><a href="UiSelector.html">UiSelector</a></code> selector for a child in a scrollable layout element</td>
</tr>
<tr>
<th>text</td>
<td>String to find in the children of the <code>childPattern</code> match</td>
</tr>
<tr>
<th>allowScrollSearch</td>
<td>set to true if scrolling is allowed</td>
</tr>
</table>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
<ul class="nolist"><li><code><a href="UiObject.html">UiObject</a></code> representing the child element that matches the search conditions</li></ul>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
<table class="jd-tagtable">
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
</tr>
</table>
</div>
</div>
</div>
<A NAME="getChildByText(com.android.uiautomator.core.UiSelector, java.lang.String)"></A>
<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
public
<a href="UiObject.html">UiObject</a>
</span>
<span class="sympad">getChildByText</span>
<span class="normal">(<a href="UiSelector.html">UiSelector</a> childPattern, String text)</span>
</h4>
<div class="api-level">
<div></div>
</div>
<div class="jd-details-descr">
<div class="jd-tagdata jd-tagdescr"><p>Searches for a child element in the present scrollable
container. The search first looks for a child element that matches the
selector you provided, then looks for the text in its children elements.
If both search conditions are fulfilled, the method returns a {@ link UiObject}
representing the element matching the selector (not the child element in its
subhierarchy containing the text). By default, this method performs a
scroll search.
See <code><a href="#getChildByText(com.android.uiautomator.core.UiSelector, java.lang.String, boolean)">getChildByText(UiSelector, String, boolean)</a></code></p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
<th>childPattern</td>
<td><code><a href="UiSelector.html">UiSelector</a></code> selector for a child in a scrollable layout element</td>
</tr>
<tr>
<th>text</td>
<td>String to find in the children of the <code>childPattern</code> match</td>
</tr>
</table>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
<ul class="nolist"><li><code><a href="UiObject.html">UiObject</a></code> representing the child element that matches the search conditions</li></ul>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
<table class="jd-tagtable">
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
</tr>
</table>
</div>
</div>
</div>
<A NAME="getMaxSearchSwipes()"></A>
<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
public
int
</span>
<span class="sympad">getMaxSearchSwipes</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
<div></div>
</div>
<div class="jd-details-descr">
<div class="jd-tagdata jd-tagdescr"><p>Gets the maximum number of scrolls allowed when performing a
scroll action in search of a child element.
See <code><a href="#getChildByDescription(com.android.uiautomator.core.UiSelector, java.lang.String)">getChildByDescription(UiSelector, String)</a></code> and
<code><a href="#getChildByText(com.android.uiautomator.core.UiSelector, java.lang.String)">getChildByText(UiSelector, String)</a></code>.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
<ul class="nolist"><li>max the number of search swipes to perform until giving up</li></ul>
</div>
</div>
</div>
<A NAME="getSwipeDeadZonePercentage()"></A>
<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
public
double
</span>
<span class="sympad">getSwipeDeadZonePercentage</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
<div></div>
</div>
<div class="jd-details-descr">
<div class="jd-tagdata jd-tagdescr"><p>Returns the percentage of a widget's size that's considered as a no-touch
zone when swiping. The no-touch zone is set as a percentage of a widget's total
width or height, denoting a margin around the swipable area of the widget.
Swipes must start and end inside this margin. This is important when the
widget being swiped may not respond to the swipe if started at a point
too near to the edge. The default is 10% from either edge.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
<ul class="nolist"><li>a value between 0 and 1</li></ul>
</div>
</div>
</div>
<A NAME="scrollBackward(int)"></A>
<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
public
boolean
</span>
<span class="sympad">scrollBackward</span>
<span class="normal">(int steps)</span>
</h4>
<div class="api-level">
<div></div>
</div>
<div class="jd-details-descr">
<div class="jd-tagdata jd-tagdescr"><p>Performs a backward scroll. If the swipe direction is set to vertical,
then the swipes will be performed from top to bottom. If the swipe
direction is set to horizontal, then the swipes will be performed from
left to right. Make sure to take into account devices configured with
right-to-left languages like Arabic and Hebrew.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
<th>steps</td>
<td>number of steps. Use this to control the speed of the scroll action.</td>
</tr>
</table>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
<ul class="nolist"><li>true if scrolled, false if can't scroll anymore</li></ul>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
<table class="jd-tagtable">
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
</tr>
</table>
</div>
</div>
</div>
<A NAME="scrollBackward()"></A>
<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
public
boolean
</span>
<span class="sympad">scrollBackward</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
<div></div>
</div>
<div class="jd-details-descr">
<div class="jd-tagdata jd-tagdescr"><p>Performs a backward scroll with the default number of scroll steps (55).
If the swipe direction is set to vertical,
then the swipes will be performed from top to bottom. If the swipe
direction is set to horizontal, then the swipes will be performed from
left to right. Make sure to take into account devices configured with
right-to-left languages like Arabic and Hebrew.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
<ul class="nolist"><li>true if scrolled, and false if can't scroll anymore</li></ul>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
<table class="jd-tagtable">
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
</tr>
</table>
</div>
</div>
</div>
<A NAME="scrollDescriptionIntoView(java.lang.String)"></A>
<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
public
boolean
</span>
<span class="sympad">scrollDescriptionIntoView</span>
<span class="normal">(String text)</span>
</h4>
<div class="api-level">
<div></div>
</div>
<div class="jd-details-descr">
<div class="jd-tagdata jd-tagdescr"><p>Performs a forward scroll action on the scrollable layout element until
the content-description is found, or until swipe attempts have been exhausted.
See <code><a href="#setMaxSearchSwipes(int)">setMaxSearchSwipes(int)</a></code></p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
<th>text</td>
<td>content-description to find within the contents of this scrollable layout element.</td>
</tr>
</table>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
<ul class="nolist"><li>true if item is found; else, false</li></ul>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
<table class="jd-tagtable">
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
</tr>
</table>
</div>
</div>
</div>
<A NAME="scrollForward()"></A>
<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
public
boolean
</span>
<span class="sympad">scrollForward</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
<div></div>
</div>
<div class="jd-details-descr">
<div class="jd-tagdata jd-tagdescr"><p>Performs a forward scroll with the default number of scroll steps (55).
If the swipe direction is set to vertical,
then the swipes will be performed from bottom to top. If the swipe
direction is set to horizontal, then the swipes will be performed from
right to left. Make sure to take into account devices configured with
right-to-left languages like Arabic and Hebrew.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
<ul class="nolist"><li>true if scrolled, false if can't scroll anymore</li></ul>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
<table class="jd-tagtable">
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
</tr>
</table>
</div>
</div>
</div>
<A NAME="scrollForward(int)"></A>
<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
public
boolean
</span>
<span class="sympad">scrollForward</span>
<span class="normal">(int steps)</span>
</h4>
<div class="api-level">
<div></div>
</div>
<div class="jd-details-descr">
<div class="jd-tagdata jd-tagdescr"><p>Performs a forward scroll. If the swipe direction is set to vertical,
then the swipes will be performed from bottom to top. If the swipe
direction is set to horizontal, then the swipes will be performed from
right to left. Make sure to take into account devices configured with
right-to-left languages like Arabic and Hebrew.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
<th>steps</td>
<td>number of steps. Use this to control the speed of the scroll action</td>
</tr>
</table>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
<ul class="nolist"><li>true if scrolled, false if can't scroll anymore</li></ul>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
<table class="jd-tagtable">
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
</tr>
</table>
</div>
</div>
</div>
<A NAME="scrollIntoView(com.android.uiautomator.core.UiSelector)"></A>
<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
public
boolean
</span>
<span class="sympad">scrollIntoView</span>
<span class="normal">(<a href="UiSelector.html">UiSelector</a> selector)</span>
</h4>
<div class="api-level">
<div></div>
</div>
<div class="jd-details-descr">
<div class="jd-tagdata jd-tagdescr"><p>Perform a scroll forward action to move through the scrollable layout
element until a visible item that matches the selector is found.
See <code><a href="#scrollDescriptionIntoView(java.lang.String)">scrollDescriptionIntoView(String)</a></code> and <code><a href="#scrollTextIntoView(java.lang.String)">scrollTextIntoView(String)</a></code>.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
<th>selector</td>
<td><code><a href="UiSelector.html">UiSelector</a></code> selector</td>
</tr>
</table>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
<ul class="nolist"><li>true if the item was found and now is in view; else, false</li></ul>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
<table class="jd-tagtable">
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
</tr>
</table>
</div>
</div>
</div>
<A NAME="scrollIntoView(com.android.uiautomator.core.UiObject)"></A>
<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
public
boolean
</span>
<span class="sympad">scrollIntoView</span>
<span class="normal">(<a href="UiObject.html">UiObject</a> obj)</span>
</h4>
<div class="api-level">
<div></div>
</div>
<div class="jd-details-descr">
<div class="jd-tagdata jd-tagdescr"><p>Perform a forward scroll action to move through the scrollable layout element until
a visible item that matches the <code><a href="UiObject.html">UiObject</a></code> is found.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
<th>obj</td>
<td><code><a href="UiObject.html">UiObject</a></code></td>
</tr>
</table>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
<ul class="nolist"><li>true if the item was found and now is in view else false</li></ul>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
<table class="jd-tagtable">
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
</tr>
</table>
</div>
</div>
</div>
<A NAME="scrollTextIntoView(java.lang.String)"></A>
<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
public
boolean
</span>
<span class="sympad">scrollTextIntoView</span>
<span class="normal">(String text)</span>
</h4>
<div class="api-level">
<div></div>
</div>
<div class="jd-details-descr">
<div class="jd-tagdata jd-tagdescr"><p>Performs a forward scroll action on the scrollable layout element until
the text you provided is visible, or until swipe attempts have been exhausted.
See <code><a href="#setMaxSearchSwipes(int)">setMaxSearchSwipes(int)</a></code></p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
<th>text</td>
<td>test to look for</td>
</tr>
</table>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
<ul class="nolist"><li>true if item is found; else, false</li></ul>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
<table class="jd-tagtable">
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
</tr>
</table>
</div>
</div>
</div>
<A NAME="scrollToBeginning(int)"></A>
<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
public
boolean
</span>
<span class="sympad">scrollToBeginning</span>
<span class="normal">(int maxSwipes)</span>
</h4>
<div class="api-level">
<div></div>
</div>
<div class="jd-details-descr">
<div class="jd-tagdata jd-tagdescr"><p>Scrolls to the beginning of a scrollable layout element. The beginning
can be at the top-most edge in the case of vertical controls, or the
left-most edge for horizontal controls. Make sure to take into account
devices configured with right-to-left languages like Arabic and Hebrew.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
<ul class="nolist"><li>true on scrolled else false</li></ul>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
<table class="jd-tagtable">
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
</tr>
</table>
</div>
</div>
</div>
<A NAME="scrollToBeginning(int, int)"></A>
<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
public
boolean
</span>
<span class="sympad">scrollToBeginning</span>
<span class="normal">(int maxSwipes, int steps)</span>
</h4>
<div class="api-level">
<div></div>
</div>
<div class="jd-details-descr">
<div class="jd-tagdata jd-tagdescr"><p>Scrolls to the beginning of a scrollable layout element. The beginning
can be at the top-most edge in the case of vertical controls, or the
left-most edge for horizontal controls. Make sure to take into account
devices configured with right-to-left languages like Arabic and Hebrew.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
<th>steps</td>
<td>use steps to control the speed, so that it may be a scroll, or fling</td>
</tr>
</table>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
<ul class="nolist"><li>true on scrolled else false</li></ul>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
<table class="jd-tagtable">
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
</tr>
</table>
</div>
</div>
</div>
<A NAME="scrollToEnd(int, int)"></A>
<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
public
boolean
</span>
<span class="sympad">scrollToEnd</span>
<span class="normal">(int maxSwipes, int steps)</span>
</h4>
<div class="api-level">
<div></div>
</div>
<div class="jd-details-descr">
<div class="jd-tagdata jd-tagdescr"><p>Scrolls to the end of a scrollable layout element. The end can be at the
bottom-most edge in the case of vertical controls, or the right-most edge for
horizontal controls. Make sure to take into account devices configured with
right-to-left languages like Arabic and Hebrew.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
<th>steps</td>
<td>use steps to control the speed, so that it may be a scroll, or fling</td>
</tr>
</table>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
<ul class="nolist"><li>true on scrolled else false</li></ul>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
<table class="jd-tagtable">
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
</tr>
</table>
</div>
</div>
</div>
<A NAME="scrollToEnd(int)"></A>
<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
public
boolean
</span>
<span class="sympad">scrollToEnd</span>
<span class="normal">(int maxSwipes)</span>
</h4>
<div class="api-level">
<div></div>
</div>
<div class="jd-details-descr">
<div class="jd-tagdata jd-tagdescr"><p>Scrolls to the end of a scrollable layout element. The end can be at the
bottom-most edge in the case of vertical controls, or the right-most edge for
horizontal controls. Make sure to take into account devices configured with
right-to-left languages like Arabic and Hebrew.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
<ul class="nolist"><li>true on scrolled, else false</li></ul>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
<table class="jd-tagtable">
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
</tr>
</table>
</div>
</div>
</div>
<A NAME="setAsHorizontalList()"></A>
<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
public
<a href="#">UiScrollable</a>
</span>
<span class="sympad">setAsHorizontalList</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
<div></div>
</div>
<div class="jd-details-descr">
<div class="jd-tagdata jd-tagdescr"><p>Set the direction of swipes to be horizontal when performing scroll actions.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
<ul class="nolist"><li>reference to itself</li></ul>
</div>
</div>
</div>
<A NAME="setAsVerticalList()"></A>
<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
public
<a href="#">UiScrollable</a>
</span>
<span class="sympad">setAsVerticalList</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
<div></div>
</div>
<div class="jd-details-descr">
<div class="jd-tagdata jd-tagdescr"><p>Set the direction of swipes to be vertical when performing scroll actions.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
<ul class="nolist"><li>reference to itself</li></ul>
</div>
</div>
</div>
<A NAME="setMaxSearchSwipes(int)"></A>
<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
public
<a href="#">UiScrollable</a>
</span>
<span class="sympad">setMaxSearchSwipes</span>
<span class="normal">(int swipes)</span>
</h4>
<div class="api-level">
<div></div>
</div>
<div class="jd-details-descr">
<div class="jd-tagdata jd-tagdescr"><p>Sets the maximum number of scrolls allowed when performing a
scroll action in search of a child element.
See <code><a href="#getChildByDescription(com.android.uiautomator.core.UiSelector, java.lang.String)">getChildByDescription(UiSelector, String)</a></code> and
<code><a href="#getChildByText(com.android.uiautomator.core.UiSelector, java.lang.String)">getChildByText(UiSelector, String)</a></code>.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
<th>swipes</td>
<td>the number of search swipes to perform until giving up</td>
</tr>
</table>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
<ul class="nolist"><li>reference to itself</li></ul>
</div>
</div>
</div>
<A NAME="setSwipeDeadZonePercentage(double)"></A>
<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
public
<a href="#">UiScrollable</a>
</span>
<span class="sympad">setSwipeDeadZonePercentage</span>
<span class="normal">(double swipeDeadZonePercentage)</span>
</h4>
<div class="api-level">
<div></div>
</div>
<div class="jd-details-descr">
<div class="jd-tagdata jd-tagdescr"><p>Sets the percentage of a widget's size that's considered as no-touch
zone when swiping.
The no-touch zone is set as percentage of a widget's total width or height,
denoting a margin around the swipable area of the widget. Swipes must
always start and end inside this margin. This is important when the
widget being swiped may not respond to the swipe if started at a point
too near to the edge. The default is 10% from either edge.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
<th>swipeDeadZonePercentage</td>
<td>is a value between 0 and 1</td>
</tr>
</table>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
<ul class="nolist"><li>reference to itself</li></ul>
</div>
</div>
</div>
<!-- ========= METHOD DETAIL ======== -->
<h2>Protected Methods</h2>
<A NAME="exists(com.android.uiautomator.core.UiSelector)"></A>
<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
protected
boolean
</span>
<span class="sympad">exists</span>
<span class="normal">(<a href="UiSelector.html">UiSelector</a> selector)</span>
</h4>
<div class="api-level">
<div></div>
</div>
<div class="jd-details-descr">
<div class="jd-tagdata jd-tagdescr"><p>Used privately when performing swipe searches to decide if an element has become
visible or not.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
<ul class="nolist"><li>true if found else false</li></ul>
</div>
</div>