blob: 7c6a83aa8d70714682cb94e9cdb2c2d1708ef4fb [file] [log] [blame]
Quddus Chong489218c2015-02-26 16:38:46 -08001<!DOCTYPE html>
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98<html>
99<head>
100
101
102<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
103<meta name="viewport" content="width=device-width" />
104
105<link rel="shortcut icon" type="image/x-icon" href="../../../../../favicon.ico" />
106<title>IdlingResource | Android Developers</title>
107
108<!-- STYLESHEETS -->
109<link rel="stylesheet"
110href="http://fonts.googleapis.com/css?family=Roboto+Condensed">
111<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Roboto:light,regular,medium,thin,italic,mediumitalic,bold"
112 title="roboto">
113<link href="../../../../../assets/css/default.css?v=2" rel="stylesheet" type="text/css">
114
115
116<!-- FULLSCREEN STYLESHEET -->
117<link href="../../../../../assets/css/fullscreen.css" rel="stylesheet" class="fullscreen"
118type="text/css">
119
120
121<!-- JAVASCRIPT -->
122<script src="http://www.google.com/jsapi" type="text/javascript"></script>
123<script src="../../../../../assets/js/android_3p-bundle.js" type="text/javascript"></script>
124<script type="text/javascript">
125 var toRoot = "../../../../../";
126 var metaTags = [];
127 var devsite = false;
128</script>
129<script src="../../../../../assets/js/docs.js?v=2" type="text/javascript"></script>
130
131<script>
132 (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
133 (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
134 m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
135 })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
136
137 ga('create', 'UA-5831155-1', 'android.com');
138 ga('create', 'UA-49880327-2', 'android.com', {'name': 'universal'}); // New tracker);
139 ga('send', 'pageview');
140 ga('universal.send', 'pageview'); // Send page view for new tracker.
141</script>
142
143</head>
144
145<body class="gc-documentation
146 develop reference" itemscope itemtype="http://schema.org/Article">
147 <div id="doc-api-level" class="" style="display:none"></div>
148 <a name="top"></a>
149
150
151<a name="top"></a>
152
153 <!-- Header -->
154 <div id="header-wrapper">
155 <div id="header">
156
157
158
159
160 <div class="wrap" id="header-wrap">
161 <div class="col-3 logo">
162 <a href="../../../../../index.html">
163 <img src="../../../../../assets/images/dac_logo.png"
164 srcset="../../../../../assets/images/dac_logo@2x.png 2x"
165 width="123" height="25" alt="Android Developers" />
166 </a>
167 <div class="btn-quicknav" id="btn-quicknav">
168 <a href="#" class="arrow-inactive">Quicknav</a>
169 <a href="#" class="arrow-active">Quicknav</a>
170 </div>
171 </div>
172 <ul class="nav-x col-9">
173 <li class="design">
174 <a href="../../../../../design/index.html"
175 zh-tw-lang="設計"
176 zh-cn-lang="设计"
177 ru-lang="Проектирование"
178 ko-lang="디자인"
179 ja-lang="設計"
180 es-lang="Diseñar"
181 >Design</a></li>
182 <li class="develop"><a href="../../../../../develop/index.html"
183 zh-tw-lang="開發"
184 zh-cn-lang="开发"
185 ru-lang="Разработка"
186 ko-lang="개발"
187 ja-lang="開発"
188 es-lang="Desarrollar"
189 >Develop</a></li>
190 <li class="distribute last"><a href="../../../../../distribute/index.html"
191 zh-tw-lang="發佈"
192 zh-cn-lang="分发"
193 ru-lang="Распространение"
194 ko-lang="배포"
195 ja-lang="配布"
196 es-lang="Distribuir"
197 >Distribute</a></li>
198 </ul>
199
200
201
202
203<div class="menu-container">
204 <div class="moremenu">
205 <div id="more-btn"></div>
206 </div>
207 <div class="morehover" id="moremenu">
208 <div class="top"></div>
209 <div class="mid">
210 <div class="header">Links</div>
211 <ul>
212 <li><a href="https://play.google.com/apps/publish/" target="_googleplay">Google Play Developer Console</a></li>
213 <li><a href="http://android-developers.blogspot.com/">Android Developers Blog</a></li>
214 <li><a href="../../../../../about/index.html">About Android</a></li>
215 </ul>
216 <div class="header">Android Sites</div>
217 <ul>
218 <li><a href="http://www.android.com">Android.com</a></li>
219 <li class="active"><a>Android Developers</a></li>
220 <li><a href="http://source.android.com">Android Open Source Project</a></li>
221 </ul>
222
223
224
225
226 <br class="clearfix" />
227 </div><!-- end 'mid' -->
228 <div class="bottom"></div>
229 </div><!-- end 'moremenu' -->
230
231 <div class="search" id="search-container">
232 <div class="search-inner">
233 <div id="search-btn"></div>
234 <div class="left"></div>
235 <form onsubmit="return submit_search()">
236 <input id="search_autocomplete" type="text" value="" autocomplete="off" name="q"
237 onfocus="search_focus_changed(this, true)" onblur="search_focus_changed(this, false)"
238 onkeydown="return search_changed(event, true, '../../../../../')"
239 onkeyup="return search_changed(event, false, '../../../../../')" />
240 </form>
241 <div class="right"></div>
242 <a class="close hide">close</a>
243 <div class="left"></div>
244 <div class="right"></div>
245 </div><!-- end search-inner -->
246 </div><!-- end search-container -->
247
248 <div class="search_filtered_wrapper reference">
249 <div class="suggest-card reference no-display">
250 <ul class="search_filtered">
251 </ul>
252 </div>
253 </div>
254
255 <div class="search_filtered_wrapper docs">
256 <div class="suggest-card dummy no-display">&nbsp;</div>
257 <div class="suggest-card develop no-display">
258 <ul class="search_filtered">
259 </ul>
260 <div class="child-card guides no-display">
261 </div>
262 <div class="child-card training no-display">
263 </div>
264 <div class="child-card samples no-display">
265 </div>
266 </div>
267 <div class="suggest-card design no-display">
268 <ul class="search_filtered">
269 </ul>
270 </div>
271 <div class="suggest-card distribute no-display">
272 <ul class="search_filtered">
273 </ul>
274 </div>
275 </div>
276</div><!-- end menu-container (search and menu widget) -->
277
278
279
280 <!-- Expanded quicknav -->
281 <div id="quicknav" class="col-13">
282 <ul>
283 <li class="about">
284 <ul>
285 <li><a href="../../../../../about/index.html">About</a></li>
286 <li><a href="../../../../../wear/index.html">Wear</a></li>
287 <li><a href="../../../../../tv/index.html">TV</a></li>
288 <li><a href="../../../../../auto/index.html">Auto</a></li>
289 </ul>
290 </li>
291 <li class="design">
292 <ul>
293 <li><a href="../../../../../design/index.html">Get Started</a></li>
294 <li><a href="../../../../../design/devices.html">Devices</a></li>
295 <li><a href="../../../../../design/style/index.html">Style</a></li>
296 <li><a href="../../../../../design/patterns/index.html">Patterns</a></li>
297 <li><a href="../../../../../design/building-blocks/index.html">Building Blocks</a></li>
298 <li><a href="../../../../../design/downloads/index.html">Downloads</a></li>
299 <li><a href="../../../../../design/videos/index.html">Videos</a></li>
300 </ul>
301 </li>
302 <li class="develop">
303 <ul>
304 <li><a href="../../../../../training/index.html"
305 zh-tw-lang="訓練課程"
306 zh-cn-lang="培训"
307 ru-lang="Курсы"
308 ko-lang="교육"
309 ja-lang="トレーニング"
310 es-lang="Capacitación"
311 >Training</a></li>
312 <li><a href="../../../../../guide/index.html"
313 zh-tw-lang="API 指南"
314 zh-cn-lang="API 指南"
315 ru-lang="Руководства по API"
316 ko-lang="API 가이드"
317 ja-lang="API ガイド"
318 es-lang="Guías de la API"
319 >API Guides</a></li>
320 <li><a href="../../../../../reference/packages.html"
321 zh-tw-lang="參考資源"
322 zh-cn-lang="参考"
323 ru-lang="Справочник"
324 ko-lang="참조문서"
325 ja-lang="リファレンス"
326 es-lang="Referencia"
327 >Reference</a></li>
328 <li><a href="../../../../../sdk/index.html"
329 zh-tw-lang="相關工具"
330 zh-cn-lang="工具"
331 ru-lang="Инструменты"
332 ko-lang="도구"
333 ja-lang="ツール"
334 es-lang="Herramientas"
335 >Tools</a>
336 </li>
337 <li><a href="../../../../../google/index.html">Google Services</a>
338 </li>
339
340 </ul>
341 </li>
342 <li class="distribute last">
343 <ul>
344 <li><a href="../../../../../distribute/googleplay/index.html">Google Play</a></li>
345 <li><a href="../../../../../distribute/essentials/index.html">Essentials</a></li>
346 <li><a href="../../../../../distribute/users/index.html">Get Users</a></li>
347 <li><a href="../../../../../distribute/engage/index.html">Engage &amp; Retain</a></li>
348 <li><a href="../../../../../distribute/monetize/index.html">Monetize</a></li>
349 <li><a href="../../../../../distribute/tools/index.html">Tools &amp; Reference</a></li>
350 <li><a href="../../../../../distribute/stories/index.html">Developer Stories</a></li>
351 </ul>
352 </li>
353 </ul>
354 </div><!-- /Expanded quicknav -->
355 </div><!-- end header-wrap.wrap -->
356 </div><!-- end header -->
357
358
359 <!-- Secondary x-nav -->
360 <div id="nav-x">
361 <div class="wrap" style="position:relative;z-index:1">
362
363
364 <a id="helpoutsLink" class="resource resource-card resource-card-6x2x3 resource-card-6x2 helpouts-card"
365 href="http://helpouts.google.com/partner/landing/provider/googledevelopers" target="_blank">
366 <div class="card-bg helpouts-card-bg"></div>
367 <div class="card-info">
368 <div class="helpouts-description">
369 <div class="text">Help developers solve problems<br/>
370 <span id="helpoutsLinkText" class="link-color" style="display:block;padding-top:5px;text-align:right">Learn more</span>
371 </div>
372 </div>
373 </div>
374 </a>
375 <script>
376 var textA = "LEARN MORE";
377 var linkA = "http://helpouts.google.com/partner/landing/provider/googledevelopers?utm_source=android_banner1&utm_medium=banner&utm_campaign=android_provider_banner1";
378 var textB = "SIGN UP NOW";
379 var linkB = "http://helpouts.google.com/partner/landing/provider/googledevelopers?utm_source=android_banner2&utm_medium=banner&utm_campaign=android_provider_banner2";
380
381 if (Math.floor(1/Math.random()) > 1) {
382 $("a#helpoutsLink").attr('href', linkA);
383 $("span#helpoutsLinkText").text(textA);
384 } else {
385 $("a#helpoutsLink").attr('href', linkB);
386 $("span#helpoutsLinkText").text(textB);
387 }
388 </script>
389
390
391 <ul class="nav-x col-9 develop" style="width:100%">
392 <li class="training"><a href="../../../../../training/index.html"
393 zh-tw-lang="訓練課程"
394 zh-cn-lang="培训"
395 ru-lang="Курсы"
396 ko-lang="교육"
397 ja-lang="トレーニング"
398 es-lang="Capacitación"
399 >Training</a></li>
400 <li class="guide"><a href="../../../../../guide/index.html"
401 zh-tw-lang="API 指南"
402 zh-cn-lang="API 指南"
403 ru-lang="Руководства по API"
404 ko-lang="API 가이드"
405 ja-lang="API ガイド"
406 es-lang="Guías de la API"
407 >API Guides</a></li>
408 <li class="reference"><a href="../../../../../reference/packages.html"
409 zh-tw-lang="參考資源"
410 zh-cn-lang="参考"
411 ru-lang="Справочник"
412 ko-lang="참조문서"
413 ja-lang="リファレンス"
414 es-lang="Referencia"
415 >Reference</a></li>
416 <li class="tools"><a href="../../../../../sdk/index.html"
417 zh-tw-lang="相關工具"
418 zh-cn-lang="工具"
419 ru-lang="Инструменты"
420 ko-lang="도구"
421 ja-lang="ツール"
422 es-lang="Herramientas"
423 >Tools</a></li>
424 <li class="google"><a href="../../../../../google/index.html"
425 >Google Services</a>
426 </li>
427
428 </ul>
429 </div>
430 </div>
431 <!-- /Sendondary x-nav DEVELOP -->
432
433
434
435 <div id="searchResults" class="wrap" style="display:none;">
436 <h2 id="searchTitle">Results</h2>
437 <div id="leftSearchControl" class="search-control">Loading...</div>
438 </div>
439 </div> <!--end header-wrapper -->
440
441 <div id="sticky-header">
442 <div>
443 <a class="logo" href="#top"></a>
444 <a class="top" href="#top"></a>
445 <ul class="breadcrumb">
446
447 <li class="current">IdlingResource</li>
448 </ul>
449 </div>
450 </div>
451
452
453
454
455
456 <div class="wrap clearfix" id="body-content">
457 <div class="col-4" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement">
458 <div id="devdoc-nav">
459 <div id="api-nav-header">
460 <div id="api-level-toggle">
461 <label for="apiLevelCheckbox" class="disabled"
462 title="Select your target API level to dim unavailable APIs">API level: </label>
463 <div class="select-wrapper">
464 <select id="apiLevelSelector">
465 <!-- option elements added by buildApiLevelSelector() -->
466 </select>
467 </div>
468 </div><!-- end toggle -->
469 <div id="api-nav-title">Android APIs</div>
470 </div><!-- end nav header -->
471 <script>
472 var SINCE_DATA = [ ];
473 buildApiLevelSelector();
474 </script>
475
476 <div id="swapper">
477 <div id="nav-panels">
478 <div id="resize-packages-nav">
479 <div id="packages-nav" class="scroll-pane">
480
481 <ul>
482
483 <li class="api apilevel-">
484 <a href="../../../../../reference/android/support/test/package-summary.html">android.support.test</a></li>
485 <li class="selected api apilevel-">
486 <a href="../../../../../reference/android/support/test/espresso/package-summary.html">android.support.test.espresso</a></li>
487 <li class="api apilevel-">
488 <a href="../../../../../reference/android/support/test/espresso/action/package-summary.html">android.support.test.espresso.action</a></li>
489 <li class="api apilevel-">
490 <a href="../../../../../reference/android/support/test/espresso/assertion/package-summary.html">android.support.test.espresso.assertion</a></li>
491 <li class="api apilevel-">
492 <a href="../../../../../reference/android/support/test/espresso/base/package-summary.html">android.support.test.espresso.base</a></li>
493 <li class="api apilevel-">
494 <a href="../../../../../reference/android/support/test/espresso/contrib/package-summary.html">android.support.test.espresso.contrib</a></li>
495 <li class="api apilevel-">
496 <a href="../../../../../reference/android/support/test/espresso/matcher/package-summary.html">android.support.test.espresso.matcher</a></li>
497 <li class="api apilevel-">
498 <a href="../../../../../reference/android/support/test/espresso/util/package-summary.html">android.support.test.espresso.util</a></li>
499 <li class="api apilevel-">
500 <a href="../../../../../reference/android/support/test/filters/package-summary.html">android.support.test.filters</a></li>
501 <li class="api apilevel-">
502 <a href="../../../../../reference/android/support/test/runner/package-summary.html">android.support.test.runner</a></li>
503 <li class="api apilevel-">
504 <a href="../../../../../reference/android/support/test/runner/lifecycle/package-summary.html">android.support.test.runner.lifecycle</a></li>
505 <li class="api apilevel-">
506 <a href="../../../../../reference/android/support/test/uiautomator/package-summary.html">android.support.test.uiautomator</a></li>
507 </ul><br/>
508
509 </div> <!-- end packages-nav -->
510 </div> <!-- end resize-packages -->
511 <div id="classes-nav" class="scroll-pane">
512
513
514
515 <ul>
516
517
518 <li><h2>Interfaces</h2>
519 <ul>
520 <li class="api apilevel-"><a href="../../../../../reference/android/support/test/espresso/EspressoException.html">EspressoException</a></li>
521 <li class="api apilevel-"><a href="../../../../../reference/android/support/test/espresso/FailureHandler.html">FailureHandler</a></li>
522 <li class="selected api apilevel-"><a href="../../../../../reference/android/support/test/espresso/IdlingResource.html">IdlingResource</a></li>
523 <li class="api apilevel-"><a href="../../../../../reference/android/support/test/espresso/IdlingResource.ResourceCallback.html">IdlingResource.ResourceCallback</a></li>
524 <li class="api apilevel-"><a href="../../../../../reference/android/support/test/espresso/UiController.html">UiController</a></li>
525 <li class="api apilevel-"><a href="../../../../../reference/android/support/test/espresso/ViewAction.html">ViewAction</a></li>
526 <li class="api apilevel-"><a href="../../../../../reference/android/support/test/espresso/ViewAssertion.html">ViewAssertion</a></li>
527 <li class="api apilevel-"><a href="../../../../../reference/android/support/test/espresso/ViewFinder.html">ViewFinder</a></li>
528 </ul>
529 </li>
530
531 <li><h2>Classes</h2>
532 <ul>
533 <li class="api apilevel-"><a href="../../../../../reference/android/support/test/espresso/AmbiguousViewMatcherException.Builder.html">AmbiguousViewMatcherException.Builder</a></li>
534 <li class="api apilevel-"><a href="../../../../../reference/android/support/test/espresso/DataInteraction.html">DataInteraction</a></li>
535 <li class="api apilevel-"><a href="../../../../../reference/android/support/test/espresso/Espresso.html">Espresso</a></li>
536 <li class="api apilevel-"><a href="../../../../../reference/android/support/test/espresso/GraphHolder.html">GraphHolder</a></li>
537 <li class="api apilevel-"><a href="../../../../../reference/android/support/test/espresso/IdlingPolicies.html">IdlingPolicies</a></li>
538 <li class="api apilevel-"><a href="../../../../../reference/android/support/test/espresso/IdlingPolicy.html">IdlingPolicy</a></li>
539 <li class="api apilevel-"><a href="../../../../../reference/android/support/test/espresso/NoMatchingViewException.Builder.html">NoMatchingViewException.Builder</a></li>
540 <li class="api apilevel-"><a href="../../../../../reference/android/support/test/espresso/PerformException.Builder.html">PerformException.Builder</a></li>
541 <li class="api apilevel-"><a href="../../../../../reference/android/support/test/espresso/Root.html">Root</a></li>
542 <li class="api apilevel-"><a href="../../../../../reference/android/support/test/espresso/Root.Builder.html">Root.Builder</a></li>
543 <li class="api apilevel-"><a href="../../../../../reference/android/support/test/espresso/ViewInteraction.html">ViewInteraction</a></li>
544 </ul>
545 </li>
546
547
548 <li><h2>Exceptions</h2>
549 <ul>
550 <li class="api apilevel-"><a href="../../../../../reference/android/support/test/espresso/AmbiguousViewMatcherException.html">AmbiguousViewMatcherException</a></li>
551 <li class="api apilevel-"><a href="../../../../../reference/android/support/test/espresso/AppNotIdleException.html">AppNotIdleException</a></li>
552 <li class="api apilevel-"><a href="../../../../../reference/android/support/test/espresso/IdlingResourceTimeoutException.html">IdlingResourceTimeoutException</a></li>
553 <li class="api apilevel-"><a href="../../../../../reference/android/support/test/espresso/InjectEventSecurityException.html">InjectEventSecurityException</a></li>
554 <li class="api apilevel-"><a href="../../../../../reference/android/support/test/espresso/NoActivityResumedException.html">NoActivityResumedException</a></li>
555 <li class="api apilevel-"><a href="../../../../../reference/android/support/test/espresso/NoMatchingRootException.html">NoMatchingRootException</a></li>
556 <li class="api apilevel-"><a href="../../../../../reference/android/support/test/espresso/NoMatchingViewException.html">NoMatchingViewException</a></li>
557 <li class="api apilevel-"><a href="../../../../../reference/android/support/test/espresso/PerformException.html">PerformException</a></li>
558 </ul>
559 </li>
560
561 </ul><br/>
562
563
564 </div><!-- end classes -->
565 </div><!-- end nav-panels -->
566 <div id="nav-tree" style="display:none" class="scroll-pane">
567 <div id="tree-list"></div>
568 </div><!-- end nav-tree -->
569 </div><!-- end swapper -->
570 <div id="nav-swap">
571 <a class="fullscreen">fullscreen</a>
572 <a href='#' onclick='swapNav();return false;'><span id='tree-link'>Use Tree Navigation</span><span id='panel-link' style='display:none'>Use Panel Navigation</span></a>
573 </div>
574 </div> <!-- end devdoc-nav -->
575 </div> <!-- end side-nav -->
576 <script type="text/javascript">
577 // init fullscreen based on user pref
578 var fullscreen = readCookie("fullscreen");
579 if (fullscreen != 0) {
580 if (fullscreen == "false") {
581 toggleFullscreen(false);
582 } else {
583 toggleFullscreen(true);
584 }
585 }
586 // init nav version for mobile
587 if (isMobile) {
588 swapNav(); // tree view should be used on mobile
589 $('#nav-swap').hide();
590 } else {
591 chooseDefaultNav();
592 if ($("#nav-tree").is(':visible')) {
593 init_default_navtree("../../../../../");
594 }
595 }
596 // scroll the selected page into view
597 $(document).ready(function() {
598 scrollIntoView("packages-nav");
599 scrollIntoView("classes-nav");
600 });
601 </script>
602
603
604
605
606
607<div class="col-12" id="doc-col">
608
609<div id="api-info-block">
610
611
612
613
614<div class="sum-details-links">
615
616Summary:
617
618 <a href="#nestedclasses">Nested Classes</a>
619
620
621
622
623
624
625
626
627
628
629
630
631 &#124; <a href="#pubmethods">Methods</a>
632
633
634
635
636&#124; <a href="#" onclick="return toggleAllClassInherited()" id="toggleAllClassInherited">[Expand All]</a>
637
638</div><!-- end sum-details-links -->
639<div class="api-level">
640
641
642
643
644</div>
645</div><!-- end api-info-block -->
646
647
648<!-- ======== START OF CLASS DATA ======== -->
649
650<div id="jd-header">
651 public
652
653
654
655 interface
656<h1 itemprop="name">IdlingResource</h1>
657
658
659
660
661
662
663
664
665
666
667
668</div><!-- end header -->
669
670<div id="naMessage"></div>
671
672<div id="jd-content" class="api apilevel-">
673<table class="jd-inheritance-table">
674
675
676 <tr>
677
678 <td colspan="1" class="jd-inheritance-class-cell">android.support.test.espresso.IdlingResource</td>
679 </tr>
680
681
682</table>
683
684
685
686
687
688
689<table class="jd-sumtable jd-sumtable-subclasses"><tr><td colspan="12" style="border:none;margin:0;padding:0;">
690
691 <a href="#" onclick="return toggleInherited(this, null)" id="subclasses-indirect" class="jd-expando-trigger closed"
692 ><img id="subclasses-indirect-trigger"
693 src="../../../../../assets/images/triangle-closed.png"
694 class="jd-expando-trigger-img" /></a>Known Indirect Subclasses
695
696 <div id="subclasses-indirect">
697 <div id="subclasses-indirect-list"
698 class="jd-inheritedlinks"
699
700 >
701
702
703 <a href="../../../../../reference/android/support/test/espresso/contrib/CountingIdlingResource.html">CountingIdlingResource</a>
704
705
706 </div>
707 <div id="subclasses-indirect-summary"
708 style="display: none;"
709 >
710
711 <table class="jd-sumtable-expando">
712
713 <tr class="alt-color api apilevel-" >
714 <td class="jd-linkcol"><a href="../../../../../reference/android/support/test/espresso/contrib/CountingIdlingResource.html">CountingIdlingResource</a></td>
715 <td class="jd-descrcol" width="100%">
716 An implementation of <code><a href="../../../../../reference/android/support/test/espresso/IdlingResource.html">IdlingResource</a></code> that determines idleness by maintaining an internal
717 counter.&nbsp;
718
719
720
721 </td>
722 </tr>
723
724
725 </table>
726
727 </div>
728 </div>
729</td></tr></table>
730
731
732<div class="jd-descr">
733
734
735<h2>Class Overview</h2>
736<p itemprop="articleBody">Represents a resource of an application under test which can cause asynchronous background work
737 to happen during test execution (e.g. an intent service that processes a button click). By
738 default, <code><a href="../../../../../reference/android/support/test/espresso/Espresso.html">Espresso</a></code> synchronizes all view operations with the UI thread as well as
739 AsyncTasks; however, it has no way of doing so with "hand-made" resources. In such cases, test
740 authors can register the custom resource and <code><a href="../../../../../reference/android/support/test/espresso/Espresso.html">Espresso</a></code> will wait for the resource to
741 become idle prior to executing a view operation.
742 <br><br>
743 <b>Important Note:</b> it is assumed that the resource stays idle most of the time.
744</p>
745
746
747
748
749
750</div><!-- jd-descr -->
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767<div class="jd-descr">
768
769
770<h2>Summary</h2>
771
772
773
774<!-- ======== NESTED CLASS SUMMARY ======== -->
775<table id="nestedclasses" class="jd-sumtable"><tr><th colspan="12">Nested Classes</th></tr>
776
777
778
779 <tr class="alt-color api apilevel-" >
780 <td class="jd-typecol"><nobr>
781
782
783
784
785 interface</nobr></td>
786 <td class="jd-linkcol"><a href="../../../../../reference/android/support/test/espresso/IdlingResource.ResourceCallback.html">IdlingResource.ResourceCallback</a></td>
787 <td class="jd-descrcol" width="100%">
788 Registered by an <code><a href="../../../../../reference/android/support/test/espresso/IdlingResource.html">IdlingResource</a></code> to notify Espresso of a transition to idle.&nbsp;
789
790
791
792 </td>
793 </tr>
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823<!-- ========== METHOD SUMMARY =========== -->
824<table id="pubmethods" class="jd-sumtable"><tr><th colspan="12">Public Methods</th></tr>
825
826
827
828
829 <tr class="alt-color api apilevel-" >
830 <td class="jd-typecol"><nobr>
831 abstract
832
833
834
835
836 String</nobr>
837 </td>
838 <td class="jd-linkcol" width="100%"><nobr>
839 <span class="sympad"><a href="../../../../../reference/android/support/test/espresso/IdlingResource.html#getName()">getName</a></span>()</nobr>
840
841 <div class="jd-descrdiv">
842 Returns the name of the resources (used for logging and idempotency of registration).
843
844
845
846 </div>
847
848 </td></tr>
849
850
851
852 <tr class=" api apilevel-" >
853 <td class="jd-typecol"><nobr>
854 abstract
855
856
857
858
859 boolean</nobr>
860 </td>
861 <td class="jd-linkcol" width="100%"><nobr>
862 <span class="sympad"><a href="../../../../../reference/android/support/test/espresso/IdlingResource.html#isIdleNow()">isIdleNow</a></span>()</nobr>
863
864 <div class="jd-descrdiv">
865 Returns <code>true</code> if resource is currently idle.
866
867
868
869 </div>
870
871 </td></tr>
872
873
874
875 <tr class="alt-color api apilevel-" >
876 <td class="jd-typecol"><nobr>
877 abstract
878
879
880
881
882 void</nobr>
883 </td>
884 <td class="jd-linkcol" width="100%"><nobr>
885 <span class="sympad"><a href="../../../../../reference/android/support/test/espresso/IdlingResource.html#registerIdleTransitionCallback(android.support.test.espresso.IdlingResource.ResourceCallback)">registerIdleTransitionCallback</a></span>(<a href="../../../../../reference/android/support/test/espresso/IdlingResource.ResourceCallback.html">IdlingResource.ResourceCallback</a> callback)</nobr>
886
887 <div class="jd-descrdiv">
888 Registers the given <code><a href="../../../../../reference/android/support/test/espresso/IdlingResource.ResourceCallback.html">IdlingResource.ResourceCallback</a></code> with the resource.
889
890
891
892 </div>
893
894 </td></tr>
895
896
897
898</table>
899
900
901
902
903
904
905
906</div><!-- jd-descr (summary) -->
907
908<!-- Details -->
909
910
911
912
913
914
915
916
917<!-- XML Attributes -->
918
919
920<!-- Enum Values -->
921
922
923<!-- Constants -->
924
925
926<!-- Fields -->
927
928
929<!-- Public ctors -->
930
931
932
933<!-- ========= CONSTRUCTOR DETAIL ======== -->
934<!-- Protected ctors -->
935
936
937
938<!-- ========= METHOD DETAIL ======== -->
939<!-- Public methdos -->
940
941<h2>Public Methods</h2>
942
943
944
945<A NAME="getName()"></A>
946
947<div class="jd-details api apilevel-">
948 <h4 class="jd-details-title">
949 <span class="normal">
950 public
951
952
953 abstract
954
955 String
956 </span>
957 <span class="sympad">getName</span>
958 <span class="normal">()</span>
959 </h4>
960 <div class="api-level">
961 <div></div>
962
963
964
965 </div>
966 <div class="jd-details-descr">
967
968
969
970
971 <div class="jd-tagdata jd-tagdescr"><p>Returns the name of the resources (used for logging and idempotency of registration).
972</p></div>
973
974 </div>
975</div>
976
977
978<A NAME="isIdleNow()"></A>
979
980<div class="jd-details api apilevel-">
981 <h4 class="jd-details-title">
982 <span class="normal">
983 public
984
985
986 abstract
987
988 boolean
989 </span>
990 <span class="sympad">isIdleNow</span>
991 <span class="normal">()</span>
992 </h4>
993 <div class="api-level">
994 <div></div>
995
996
997
998 </div>
999 <div class="jd-details-descr">
1000
1001
1002
1003
1004 <div class="jd-tagdata jd-tagdescr"><p>Returns <code>true</code> if resource is currently idle. Espresso will <b>always</b> call this
1005 method from the main thread, therefore it should be non-blocking and return immediately.
1006</p></div>
1007
1008 </div>
1009</div>
1010
1011
1012<A NAME="registerIdleTransitionCallback(android.support.test.espresso.IdlingResource.ResourceCallback)"></A>
1013
1014<div class="jd-details api apilevel-">
1015 <h4 class="jd-details-title">
1016 <span class="normal">
1017 public
1018
1019
1020 abstract
1021
1022 void
1023 </span>
1024 <span class="sympad">registerIdleTransitionCallback</span>
1025 <span class="normal">(<a href="../../../../../reference/android/support/test/espresso/IdlingResource.ResourceCallback.html">IdlingResource.ResourceCallback</a> callback)</span>
1026 </h4>
1027 <div class="api-level">
1028 <div></div>
1029
1030
1031
1032 </div>
1033 <div class="jd-details-descr">
1034
1035
1036
1037
1038 <div class="jd-tagdata jd-tagdescr"><p>Registers the given <code><a href="../../../../../reference/android/support/test/espresso/IdlingResource.ResourceCallback.html">IdlingResource.ResourceCallback</a></code> with the resource. Espresso will call this method:
1039 <ul>
1040 <li>with its implementation of <code><a href="../../../../../reference/android/support/test/espresso/IdlingResource.ResourceCallback.html">IdlingResource.ResourceCallback</a></code> so it can be notified asynchronously
1041 that your resource is idle
1042 <li>from the main thread, but you are free to execute the callback's onTransitionToIdle from
1043 any thread
1044 <li>once (when it is initially given a reference to your IdlingResource)
1045 </ul>
1046 <br>
1047 You only need to call this upon transition from busy to idle - if the resource is already idle
1048 when the method is called invoking the call back is optional and has no significant impact.
1049</p></div>
1050
1051 </div>
1052</div>
1053
1054
1055
1056
1057
1058<!-- ========= METHOD DETAIL ======== -->
1059
1060
1061
1062<!-- ========= END OF CLASS DATA ========= -->
1063<A NAME="navbar_top"></A>
1064
1065<div id="footer" class="wrap" >
1066
1067
1068 <div id="copyright">
1069
1070 Except as noted, this content is licensed under <a
1071 href="http://www.apache.org/licenses/LICENSE-2.0">Apache 2.0</a>.
1072 For details and restrictions, see the <a href="../../../../../license.html">
1073 Content License</a>.
1074 </div>
1075 <div id="build_info">
1076
1077 Android &nbsp;r &mdash;
1078<script src="../../../../../timestamp.js" type="text/javascript"></script>
1079<script>document.write(BUILD_TIMESTAMP)</script>
1080
1081 </div>
1082
1083
1084 <div id="footerlinks">
1085
1086 <p>
1087 <a href="../../../../../about/index.html">About Android</a>&nbsp;&nbsp;|&nbsp;
1088 <a href="../../../../../legal.html">Legal</a>&nbsp;&nbsp;|&nbsp;
1089 <a href="../../../../../support.html">Support</a>
1090 </p>
1091 </div>
1092
1093</div> <!-- end footer -->
1094</div> <!-- jd-content -->
1095
1096</div><!-- end doc-content -->
1097
1098</div> <!-- end body-content -->
1099
1100
1101
1102
1103
1104
1105</body>
1106</html>