Quddus Chong | 900831f | 2015-04-17 15:01:16 -0700 | [diff] [blame] | 1 | <!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 | |
| 99 | <html> |
| 100 | <head> |
| 101 | |
| 102 | |
| 103 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| 104 | <meta name="viewport" content="width=device-width" /> |
| 105 | |
| 106 | <link rel="shortcut icon" type="image/x-icon" href="../../../../../favicon.ico" /> |
| 107 | <title>ActivityTestRule | Android Developers</title> |
| 108 | |
| 109 | <!-- STYLESHEETS --> |
| 110 | <link rel="stylesheet" |
| 111 | href="http://fonts.googleapis.com/css?family=Roboto+Condensed"> |
| 112 | <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Roboto:light,regular,medium,thin,italic,mediumitalic,bold" |
| 113 | title="roboto"> |
| 114 | <link href="../../../../../assets/css/default.css?v=5" rel="stylesheet" type="text/css"> |
| 115 | |
| 116 | |
| 117 | <!-- FULLSCREEN STYLESHEET --> |
| 118 | <link href="../../../../../assets/css/fullscreen.css" rel="stylesheet" class="fullscreen" |
| 119 | type="text/css"> |
| 120 | |
| 121 | |
| 122 | <!-- JAVASCRIPT --> |
| 123 | <script src="http://www.google.com/jsapi" type="text/javascript"></script> |
| 124 | <script src="../../../../../assets/js/android_3p-bundle.js" type="text/javascript"></script> |
| 125 | <script type="text/javascript"> |
| 126 | var toRoot = "../../../../../"; |
| 127 | var metaTags = []; |
| 128 | var devsite = false; |
| 129 | </script> |
| 130 | <script src="../../../../../assets/js/docs.js?v=3" type="text/javascript"></script> |
| 131 | |
| 132 | |
| 133 | |
| 134 | <script> |
| 135 | (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ |
| 136 | (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), |
| 137 | m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) |
| 138 | })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); |
| 139 | |
| 140 | ga('create', 'UA-5831155-1', 'android.com'); |
| 141 | ga('create', 'UA-49880327-2', 'android.com', {'name': 'universal'}); // New tracker); |
| 142 | ga('send', 'pageview'); |
| 143 | ga('universal.send', 'pageview'); // Send page view for new tracker. |
| 144 | </script> |
| 145 | |
| 146 | </head> |
| 147 | |
| 148 | <body class="gc-documentation |
| 149 | develop reference" itemscope itemtype="http://schema.org/Article"> |
| 150 | <div id="doc-api-level" class="" style="display:none"></div> |
| 151 | <a name="top"></a> |
| 152 | |
| 153 | |
| 154 | <a name="top"></a> |
| 155 | |
| 156 | <!-- dialog to prompt lang pref change when loaded from hardcoded URL |
| 157 | <div id="langMessage" style="display:none"> |
| 158 | <div> |
| 159 | <div class="lang en"> |
| 160 | <p>You requested a page in English, would you like to proceed with this language setting?</p> |
| 161 | </div> |
| 162 | <div class="lang es"> |
| 163 | <p>You requested a page in Spanish (Español), would you like to proceed with this language setting?</p> |
| 164 | </div> |
| 165 | <div class="lang ja"> |
| 166 | <p>You requested a page in Japanese (日本語), would you like to proceed with this language setting?</p> |
| 167 | </div> |
| 168 | <div class="lang ko"> |
| 169 | <p>You requested a page in Korean (한국어), would you like to proceed with this language setting?</p> |
| 170 | </div> |
| 171 | <div class="lang ru"> |
| 172 | <p>You requested a page in Russian (Русский), would you like to proceed with this language setting?</p> |
| 173 | </div> |
| 174 | <div class="lang zh-cn"> |
| 175 | <p>You requested a page in Simplified Chinese (简体中文), would you like to proceed with this language setting?</p> |
| 176 | </div> |
| 177 | <div class="lang zh-tw"> |
| 178 | <p>You requested a page in Traditional Chinese (繁體中文), would you like to proceed with this language setting?</p> |
| 179 | </div> |
| 180 | <a href="#" class="button yes" onclick="return false;"> |
| 181 | <span class="lang en">Yes</span> |
| 182 | <span class="lang es">Sí</span> |
| 183 | <span class="lang ja">Yes</span> |
| 184 | <span class="lang ko">Yes</span> |
| 185 | <span class="lang ru">Yes</span> |
| 186 | <span class="lang zh-cn">是的</span> |
| 187 | <span class="lang zh-tw">没有</span> |
| 188 | </a> |
| 189 | <a href="#" class="button" onclick="$('#langMessage').hide();return false;"> |
| 190 | <span class="lang en">No</span> |
| 191 | <span class="lang es">No</span> |
| 192 | <span class="lang ja">No</span> |
| 193 | <span class="lang ko">No</span> |
| 194 | <span class="lang ru">No</span> |
| 195 | <span class="lang zh-cn">没有</span> |
| 196 | <span class="lang zh-tw">没有</span> |
| 197 | </a> |
| 198 | </div> |
| 199 | </div> --> |
| 200 | |
| 201 | |
| 202 | <!-- Header --> |
| 203 | <div id="header-wrapper"> |
| 204 | <div id="header"> |
| 205 | |
| 206 | |
| 207 | |
| 208 | |
| 209 | <div class="wrap" id="header-wrap"> |
| 210 | <div class="col-3 logo"> |
| 211 | <a href="../../../../../index.html"> |
| 212 | <img src="../../../../../assets/images/dac_logo.png" |
| 213 | srcset="../../../../../assets/images/dac_logo@2x.png 2x" |
| 214 | width="123" height="25" alt="Android Developers" /> |
| 215 | </a> |
| 216 | <div class="btn-quicknav" id="btn-quicknav"> |
| 217 | <a href="#" class="arrow-inactive">Quicknav</a> |
| 218 | <a href="#" class="arrow-active">Quicknav</a> |
| 219 | </div> |
| 220 | </div> |
| 221 | <ul class="nav-x col-9"> |
| 222 | <li class="design"> |
| 223 | <a href="../../../../../design/index.html" |
| 224 | zh-tw-lang="設計" |
| 225 | zh-cn-lang="设计" |
| 226 | ru-lang="Проектирование" |
| 227 | ko-lang="디자인" |
| 228 | ja-lang="設計" |
| 229 | es-lang="Diseñar" |
| 230 | >Design</a></li> |
| 231 | <li class="develop"><a href="../../../../../develop/index.html" |
| 232 | zh-tw-lang="開發" |
| 233 | zh-cn-lang="开发" |
| 234 | ru-lang="Разработка" |
| 235 | ko-lang="개발" |
| 236 | ja-lang="開発" |
| 237 | es-lang="Desarrollar" |
| 238 | >Develop</a></li> |
| 239 | <li class="distribute last"><a href="../../../../../distribute/index.html" |
| 240 | zh-tw-lang="發佈" |
| 241 | zh-cn-lang="分发" |
| 242 | ru-lang="Распространение" |
| 243 | ko-lang="배포" |
| 244 | ja-lang="配布" |
| 245 | es-lang="Distribuir" |
| 246 | >Distribute</a></li> |
| 247 | </ul> |
| 248 | |
| 249 | |
| 250 | |
| 251 | |
| 252 | <div class="menu-container"> |
| 253 | <div class="moremenu"> |
| 254 | <div id="more-btn"></div> |
| 255 | </div> |
| 256 | <div class="morehover" id="moremenu"> |
| 257 | <div class="top"></div> |
| 258 | <div class="mid"> |
| 259 | <div class="header">Links</div> |
| 260 | <ul> |
| 261 | <li><a href="https://play.google.com/apps/publish/" target="_googleplay">Google Play Developer Console</a></li> |
| 262 | <li><a href="http://android-developers.blogspot.com/">Android Developers Blog</a></li> |
| 263 | <li><a href="../../../../../about/index.html">About Android</a></li> |
| 264 | </ul> |
| 265 | <div class="header">Android Sites</div> |
| 266 | <ul> |
| 267 | <li><a href="http://www.android.com">Android.com</a></li> |
| 268 | <li class="active"><a>Android Developers</a></li> |
| 269 | <li><a href="http://source.android.com">Android Open Source Project</a></li> |
| 270 | </ul> |
| 271 | |
| 272 | |
| 273 | |
| 274 | |
| 275 | <br class="clearfix" /> |
| 276 | </div><!-- end 'mid' --> |
| 277 | <div class="bottom"></div> |
| 278 | </div><!-- end 'moremenu' --> |
| 279 | |
| 280 | <div class="search" id="search-container"> |
| 281 | <div class="search-inner"> |
| 282 | <div id="search-btn"></div> |
| 283 | <div class="left"></div> |
| 284 | <form onsubmit="return submit_search()"> |
| 285 | <input id="search_autocomplete" type="text" value="" autocomplete="off" name="q" |
| 286 | onfocus="search_focus_changed(this, true)" onblur="search_focus_changed(this, false)" |
| 287 | onkeydown="return search_changed(event, true, '../../../../../')" |
| 288 | onkeyup="return search_changed(event, false, '../../../../../')" /> |
| 289 | </form> |
| 290 | <div class="right"></div> |
| 291 | <a class="close hide">close</a> |
| 292 | <div class="left"></div> |
| 293 | <div class="right"></div> |
| 294 | </div><!-- end search-inner --> |
| 295 | </div><!-- end search-container --> |
| 296 | |
| 297 | <div class="search_filtered_wrapper reference"> |
| 298 | <div class="suggest-card reference no-display"> |
| 299 | <ul class="search_filtered"> |
| 300 | </ul> |
| 301 | </div> |
| 302 | </div> |
| 303 | |
| 304 | <div class="search_filtered_wrapper docs"> |
| 305 | <div class="suggest-card dummy no-display"> </div> |
| 306 | <div class="suggest-card develop no-display"> |
| 307 | <ul class="search_filtered"> |
| 308 | </ul> |
| 309 | <div class="child-card guides no-display"> |
| 310 | </div> |
| 311 | <div class="child-card training no-display"> |
| 312 | </div> |
| 313 | <div class="child-card samples no-display"> |
| 314 | </div> |
| 315 | </div> |
| 316 | <div class="suggest-card design no-display"> |
| 317 | <ul class="search_filtered"> |
| 318 | </ul> |
| 319 | </div> |
| 320 | <div class="suggest-card distribute no-display"> |
| 321 | <ul class="search_filtered"> |
| 322 | </ul> |
| 323 | </div> |
| 324 | </div> |
| 325 | </div><!-- end menu-container (search and menu widget) --> |
| 326 | |
| 327 | |
| 328 | |
| 329 | <!-- Expanded quicknav --> |
| 330 | <div id="quicknav" class="col-13"> |
| 331 | <ul> |
| 332 | <li class="about"> |
| 333 | <ul> |
| 334 | <li><a href="../../../../../about/index.html">About</a></li> |
| 335 | <li><a href="../../../../../wear/index.html">Wear</a></li> |
| 336 | <li><a href="../../../../../tv/index.html">TV</a></li> |
| 337 | <li><a href="../../../../../auto/index.html">Auto</a></li> |
| 338 | </ul> |
| 339 | </li> |
| 340 | <li class="design"> |
| 341 | <ul> |
| 342 | <li><a href="../../../../../design/index.html">Get Started</a></li> |
| 343 | <li><a href="../../../../../design/devices.html">Devices</a></li> |
| 344 | <li><a href="../../../../../design/style/index.html">Style</a></li> |
| 345 | <li><a href="../../../../../design/patterns/index.html">Patterns</a></li> |
| 346 | <li><a href="../../../../../design/building-blocks/index.html">Building Blocks</a></li> |
| 347 | <li><a href="../../../../../design/downloads/index.html">Downloads</a></li> |
| 348 | <li><a href="../../../../../design/videos/index.html">Videos</a></li> |
| 349 | </ul> |
| 350 | </li> |
| 351 | <li class="develop"> |
| 352 | <ul> |
| 353 | <li><a href="../../../../../training/index.html" |
| 354 | zh-tw-lang="訓練課程" |
| 355 | zh-cn-lang="培训" |
| 356 | ru-lang="Курсы" |
| 357 | ko-lang="교육" |
| 358 | ja-lang="トレーニング" |
| 359 | es-lang="Capacitación" |
| 360 | >Training</a></li> |
| 361 | <li><a href="../../../../../guide/index.html" |
| 362 | zh-tw-lang="API 指南" |
| 363 | zh-cn-lang="API 指南" |
| 364 | ru-lang="Руководства по API" |
| 365 | ko-lang="API 가이드" |
| 366 | ja-lang="API ガイド" |
| 367 | es-lang="Guías de la API" |
| 368 | >API Guides</a></li> |
| 369 | <li><a href="../../../../../reference/packages.html" |
| 370 | zh-tw-lang="參考資源" |
| 371 | zh-cn-lang="参考" |
| 372 | ru-lang="Справочник" |
| 373 | ko-lang="참조문서" |
| 374 | ja-lang="リファレンス" |
| 375 | es-lang="Referencia" |
| 376 | >Reference</a></li> |
| 377 | <li><a href="../../../../../sdk/index.html" |
| 378 | zh-tw-lang="相關工具" |
| 379 | zh-cn-lang="工具" |
| 380 | ru-lang="Инструменты" |
| 381 | ko-lang="도구" |
| 382 | ja-lang="ツール" |
| 383 | es-lang="Herramientas" |
| 384 | >Tools</a> |
| 385 | </li> |
| 386 | <li><a href="../../../../../google/index.html">Google Services</a> |
| 387 | </li> |
| 388 | |
| 389 | </ul> |
| 390 | </li> |
| 391 | <li class="distribute last"> |
| 392 | <ul> |
| 393 | <li><a href="../../../../../distribute/googleplay/index.html">Google Play</a></li> |
| 394 | <li><a href="../../../../../distribute/essentials/index.html">Essentials</a></li> |
| 395 | <li><a href="../../../../../distribute/users/index.html">Get Users</a></li> |
| 396 | <li><a href="../../../../../distribute/engage/index.html">Engage & Retain</a></li> |
| 397 | <li><a href="../../../../../distribute/monetize/index.html">Monetize</a></li> |
| 398 | <li><a href="../../../../../distribute/analyze/index.html">Analyze</a></li> |
| 399 | <li><a href="../../../../../distribute/tools/index.html">Tools & Reference</a></li> |
| 400 | <li><a href="../../../../../distribute/stories/index.html">Developer Stories</a></li> |
| 401 | </ul> |
| 402 | </li> |
| 403 | </ul> |
| 404 | </div><!-- /Expanded quicknav --> |
| 405 | </div><!-- end header-wrap.wrap --> |
| 406 | </div><!-- end header --> |
| 407 | |
| 408 | |
| 409 | <!-- Secondary x-nav --> |
| 410 | <div id="nav-x"> |
| 411 | <div class="wrap" style="position:relative;z-index:1"> |
| 412 | |
| 413 | |
| 414 | |
| 415 | |
| 416 | |
| 417 | <ul class="nav-x col-9 develop" style="width:100%"> |
| 418 | <li class="training"><a href="../../../../../training/index.html" |
| 419 | zh-tw-lang="訓練課程" |
| 420 | zh-cn-lang="培训" |
| 421 | ru-lang="Курсы" |
| 422 | ko-lang="교육" |
| 423 | ja-lang="トレーニング" |
| 424 | es-lang="Capacitación" |
| 425 | >Training</a></li> |
| 426 | <li class="guide"><a href="../../../../../guide/index.html" |
| 427 | zh-tw-lang="API 指南" |
| 428 | zh-cn-lang="API 指南" |
| 429 | ru-lang="Руководства по API" |
| 430 | ko-lang="API 가이드" |
| 431 | ja-lang="API ガイド" |
| 432 | es-lang="Guías de la API" |
| 433 | >API Guides</a></li> |
| 434 | <li class="reference"><a href="../../../../../reference/packages.html" |
| 435 | zh-tw-lang="參考資源" |
| 436 | zh-cn-lang="参考" |
| 437 | ru-lang="Справочник" |
| 438 | ko-lang="참조문서" |
| 439 | ja-lang="リファレンス" |
| 440 | es-lang="Referencia" |
| 441 | >Reference</a></li> |
| 442 | <li class="tools"><a href="../../../../../sdk/index.html" |
| 443 | zh-tw-lang="相關工具" |
| 444 | zh-cn-lang="工具" |
| 445 | ru-lang="Инструменты" |
| 446 | ko-lang="도구" |
| 447 | ja-lang="ツール" |
| 448 | es-lang="Herramientas" |
| 449 | >Tools</a></li> |
| 450 | <li class="google"><a href="../../../../../google/index.html" |
| 451 | >Google Services</a> |
| 452 | </li> |
| 453 | |
| 454 | </ul> |
| 455 | </div> |
| 456 | </div> |
| 457 | <!-- /Sendondary x-nav DEVELOP --> |
| 458 | |
| 459 | |
| 460 | |
| 461 | <div id="searchResults" class="wrap" style="display:none;"> |
| 462 | <h2 id="searchTitle">Results</h2> |
| 463 | <div id="leftSearchControl" class="search-control">Loading...</div> |
| 464 | </div> |
| 465 | </div> <!--end header-wrapper --> |
| 466 | |
| 467 | <div id="sticky-header"> |
| 468 | <div> |
| 469 | <a class="logo" href="#top"></a> |
| 470 | <a class="top" href="#top"></a> |
| 471 | <ul class="breadcrumb"> |
| 472 | |
| 473 | <li class="current">ActivityTestRule</li> |
| 474 | </ul> |
| 475 | </div> |
| 476 | </div> |
| 477 | |
| 478 | |
| 479 | |
| 480 | |
| 481 | |
| 482 | <div class="wrap clearfix" id="body-content"> |
| 483 | <div class="col-4" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement"> |
| 484 | <div id="devdoc-nav"> |
| 485 | <div id="api-nav-header"> |
| 486 | <div id="api-level-toggle"> |
| 487 | <label for="apiLevelCheckbox" class="disabled" |
| 488 | title="Select your target API level to dim unavailable APIs">API level: </label> |
| 489 | <div class="select-wrapper"> |
| 490 | <select id="apiLevelSelector"> |
| 491 | <!-- option elements added by buildApiLevelSelector() --> |
| 492 | </select> |
| 493 | </div> |
| 494 | </div><!-- end toggle --> |
| 495 | <div id="api-nav-title">Android APIs</div> |
| 496 | </div><!-- end nav header --> |
| 497 | <script> |
| 498 | var SINCE_DATA = [ ]; |
| 499 | buildApiLevelSelector(); |
| 500 | </script> |
| 501 | |
| 502 | <div id="swapper"> |
| 503 | <div id="nav-panels"> |
| 504 | <div id="resize-packages-nav"> |
| 505 | <div id="packages-nav" class="scroll-pane"> |
| 506 | |
| 507 | <ul> |
| 508 | |
| 509 | <li class="api apilevel-"> |
| 510 | <a href="../../../../../reference/android/support/test/package-summary.html">android.support.test</a></li> |
| 511 | <li class="api apilevel-"> |
| 512 | <a href="../../../../../reference/android/support/test/annotation/package-summary.html">android.support.test.annotation</a></li> |
| 513 | <li class="api apilevel-"> |
| 514 | <a href="../../../../../reference/android/support/test/espresso/package-summary.html">android.support.test.espresso</a></li> |
| 515 | <li class="api apilevel-"> |
| 516 | <a href="../../../../../reference/android/support/test/espresso/action/package-summary.html">android.support.test.espresso.action</a></li> |
| 517 | <li class="api apilevel-"> |
| 518 | <a href="../../../../../reference/android/support/test/espresso/assertion/package-summary.html">android.support.test.espresso.assertion</a></li> |
| 519 | <li class="api apilevel-"> |
| 520 | <a href="../../../../../reference/android/support/test/espresso/base/package-summary.html">android.support.test.espresso.base</a></li> |
| 521 | <li class="api apilevel-"> |
| 522 | <a href="../../../../../reference/android/support/test/espresso/contrib/package-summary.html">android.support.test.espresso.contrib</a></li> |
| 523 | <li class="api apilevel-"> |
| 524 | <a href="../../../../../reference/android/support/test/espresso/intent/package-summary.html">android.support.test.espresso.intent</a></li> |
| 525 | <li class="api apilevel-"> |
| 526 | <a href="../../../../../reference/android/support/test/espresso/intent/matcher/package-summary.html">android.support.test.espresso.intent.matcher</a></li> |
| 527 | <li class="api apilevel-"> |
| 528 | <a href="../../../../../reference/android/support/test/espresso/intent/rule/package-summary.html">android.support.test.espresso.intent.rule</a></li> |
| 529 | <li class="api apilevel-"> |
| 530 | <a href="../../../../../reference/android/support/test/espresso/matcher/package-summary.html">android.support.test.espresso.matcher</a></li> |
| 531 | <li class="api apilevel-"> |
| 532 | <a href="../../../../../reference/android/support/test/espresso/util/package-summary.html">android.support.test.espresso.util</a></li> |
| 533 | <li class="api apilevel-"> |
| 534 | <a href="../../../../../reference/android/support/test/filters/package-summary.html">android.support.test.filters</a></li> |
| 535 | <li class="selected api apilevel-"> |
| 536 | <a href="../../../../../reference/android/support/test/rule/package-summary.html">android.support.test.rule</a></li> |
| 537 | <li class="api apilevel-"> |
| 538 | <a href="../../../../../reference/android/support/test/runner/package-summary.html">android.support.test.runner</a></li> |
| 539 | <li class="api apilevel-"> |
| 540 | <a href="../../../../../reference/android/support/test/runner/intent/package-summary.html">android.support.test.runner.intent</a></li> |
| 541 | <li class="api apilevel-"> |
| 542 | <a href="../../../../../reference/android/support/test/runner/lifecycle/package-summary.html">android.support.test.runner.lifecycle</a></li> |
| 543 | <li class="api apilevel-"> |
| 544 | <a href="../../../../../reference/android/support/test/uiautomator/package-summary.html">android.support.test.uiautomator</a></li> |
| 545 | </ul><br/> |
| 546 | |
| 547 | </div> <!-- end packages-nav --> |
| 548 | </div> <!-- end resize-packages --> |
| 549 | <div id="classes-nav" class="scroll-pane"> |
| 550 | |
| 551 | |
| 552 | |
| 553 | <ul> |
| 554 | |
| 555 | |
| 556 | |
| 557 | <li><h2>Classes</h2> |
| 558 | <ul> |
| 559 | <li class="selected api apilevel-"><a href="../../../../../reference/android/support/test/rule/ActivityTestRule.html">ActivityTestRule</a></li> |
| 560 | <li class="api apilevel-"><a href="../../../../../reference/android/support/test/rule/ServiceTestRule.html">ServiceTestRule</a></li> |
| 561 | <li class="api apilevel-"><a href="../../../../../reference/android/support/test/rule/UiThreadTestRule.html">UiThreadTestRule</a></li> |
| 562 | </ul> |
| 563 | </li> |
| 564 | |
| 565 | |
| 566 | |
| 567 | </ul><br/> |
| 568 | |
| 569 | |
| 570 | </div><!-- end classes --> |
| 571 | </div><!-- end nav-panels --> |
| 572 | <div id="nav-tree" style="display:none" class="scroll-pane"> |
| 573 | <div id="tree-list"></div> |
| 574 | </div><!-- end nav-tree --> |
| 575 | </div><!-- end swapper --> |
| 576 | <div id="nav-swap"> |
| 577 | <a class="fullscreen">fullscreen</a> |
| 578 | <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> |
| 579 | </div> |
| 580 | </div> <!-- end devdoc-nav --> |
| 581 | </div> <!-- end side-nav --> |
| 582 | <script type="text/javascript"> |
| 583 | // init fullscreen based on user pref |
| 584 | var fullscreen = readCookie("fullscreen"); |
| 585 | if (fullscreen != 0) { |
| 586 | if (fullscreen == "false") { |
| 587 | toggleFullscreen(false); |
| 588 | } else { |
| 589 | toggleFullscreen(true); |
| 590 | } |
| 591 | } |
| 592 | // init nav version for mobile |
| 593 | if (isMobile) { |
| 594 | swapNav(); // tree view should be used on mobile |
| 595 | $('#nav-swap').hide(); |
| 596 | } else { |
| 597 | chooseDefaultNav(); |
| 598 | if ($("#nav-tree").is(':visible')) { |
| 599 | init_default_navtree("../../../../../"); |
| 600 | } |
| 601 | } |
| 602 | // scroll the selected page into view |
| 603 | $(document).ready(function() { |
| 604 | scrollIntoView("packages-nav"); |
| 605 | scrollIntoView("classes-nav"); |
| 606 | }); |
| 607 | </script> |
| 608 | |
| 609 | |
| 610 | |
| 611 | |
| 612 | |
| 613 | <div class="col-12" id="doc-col"> |
| 614 | |
| 615 | <div id="api-info-block"> |
| 616 | |
| 617 | |
| 618 | |
| 619 | |
| 620 | |
| 621 | |
| 622 | |
| 623 | |
| 624 | |
| 625 | |
| 626 | |
| 627 | |
| 628 | |
| 629 | |
| 630 | |
| 631 | |
| 632 | |
| 633 | |
| 634 | |
| 635 | |
| 636 | |
| 637 | |
| 638 | |
| 639 | |
| 640 | |
| 641 | <div class="sum-details-links"> |
| 642 | |
| 643 | Summary: |
| 644 | |
| 645 | |
| 646 | |
| 647 | |
| 648 | |
| 649 | |
| 650 | |
| 651 | |
| 652 | |
| 653 | <a href="#pubctors">Ctors</a> |
| 654 | |
| 655 | |
| 656 | |
| 657 | |
| 658 | | <a href="#pubmethods">Methods</a> |
| 659 | |
| 660 | |
| 661 | |
| 662 | | <a href="#promethods">Protected Methods</a> |
| 663 | |
| 664 | |
| 665 | |
| 666 | | <a href="#inhmethods">Inherited Methods</a> |
| 667 | |
| 668 | | <a href="#" onclick="return toggleAllClassInherited()" id="toggleAllClassInherited">[Expand All]</a> |
| 669 | |
| 670 | </div><!-- end sum-details-links --> |
| 671 | <div class="api-level"> |
| 672 | |
| 673 | |
| 674 | |
| 675 | |
| 676 | </div> |
| 677 | </div><!-- end api-info-block --> |
| 678 | |
| 679 | |
| 680 | <!-- ======== START OF CLASS DATA ======== --> |
| 681 | |
| 682 | <div id="jd-header"> |
| 683 | public |
| 684 | |
| 685 | |
| 686 | |
| 687 | class |
| 688 | <h1 itemprop="name">ActivityTestRule</h1> |
| 689 | |
| 690 | |
| 691 | |
| 692 | |
| 693 | |
| 694 | |
| 695 | |
| 696 | |
| 697 | extends <a href="../../../../../reference/android/support/test/rule/UiThreadTestRule.html">UiThreadTestRule</a><br/> |
| 698 | |
| 699 | |
| 700 | |
| 701 | |
| 702 | |
| 703 | |
| 704 | |
| 705 | |
| 706 | |
| 707 | |
| 708 | |
| 709 | |
| 710 | </div><!-- end header --> |
| 711 | |
| 712 | <div id="naMessage"></div> |
| 713 | |
| 714 | <div id="jd-content" class="api apilevel-"> |
| 715 | <table class="jd-inheritance-table"> |
| 716 | |
| 717 | |
| 718 | <tr> |
| 719 | |
| 720 | <td colspan="3" class="jd-inheritance-class-cell">java.lang.Object</td> |
| 721 | </tr> |
| 722 | |
| 723 | |
| 724 | <tr> |
| 725 | |
| 726 | <td class="jd-inheritance-space"> ↳</td> |
| 727 | |
| 728 | <td colspan="2" class="jd-inheritance-class-cell"><a href="../../../../../reference/android/support/test/rule/UiThreadTestRule.html">android.support.test.rule.UiThreadTestRule</a></td> |
| 729 | </tr> |
| 730 | |
| 731 | |
| 732 | <tr> |
| 733 | |
| 734 | <td class="jd-inheritance-space"> </td> |
| 735 | |
| 736 | <td class="jd-inheritance-space"> ↳</td> |
| 737 | |
| 738 | <td colspan="1" class="jd-inheritance-class-cell">android.support.test.rule.ActivityTestRule<T extends android.app.Activity></td> |
| 739 | </tr> |
| 740 | |
| 741 | |
| 742 | </table> |
| 743 | |
| 744 | |
| 745 | |
| 746 | |
| 747 | <table class="jd-sumtable jd-sumtable-subclasses"><tr><td colspan="12" style="border:none;margin:0;padding:0;"> |
| 748 | |
| 749 | <a href="#" onclick="return toggleInherited(this, null)" id="subclasses-direct" class="jd-expando-trigger closed" |
| 750 | ><img id="subclasses-direct-trigger" |
| 751 | src="../../../../../assets/images/triangle-closed.png" |
| 752 | class="jd-expando-trigger-img" /></a>Known Direct Subclasses |
| 753 | |
| 754 | <div id="subclasses-direct"> |
| 755 | <div id="subclasses-direct-list" |
| 756 | class="jd-inheritedlinks" |
| 757 | |
| 758 | > |
| 759 | |
| 760 | |
| 761 | <a href="../../../../../reference/android/support/test/espresso/intent/rule/IntentsTestRule.html">IntentsTestRule</a><T extends Activity> |
| 762 | |
| 763 | |
| 764 | </div> |
| 765 | <div id="subclasses-direct-summary" |
| 766 | style="display: none;" |
| 767 | > |
| 768 | |
| 769 | <table class="jd-sumtable-expando"> |
| 770 | |
| 771 | <tr class="alt-color api apilevel-" > |
| 772 | <td class="jd-linkcol"><a href="../../../../../reference/android/support/test/espresso/intent/rule/IntentsTestRule.html">IntentsTestRule</a><T extends Activity></td> |
| 773 | <td class="jd-descrcol" width="100%"> |
| 774 | This rule makes it easy to use Espresso-Intents APIs in functional UI tests. |
| 775 | |
| 776 | |
| 777 | |
| 778 | </td> |
| 779 | </tr> |
| 780 | |
| 781 | |
| 782 | </table> |
| 783 | |
| 784 | </div> |
| 785 | </div> |
| 786 | </td></tr></table> |
| 787 | |
| 788 | |
| 789 | |
| 790 | |
| 791 | <div class="jd-descr"> |
| 792 | |
| 793 | |
| 794 | <h2>Class Overview</h2> |
| 795 | <p itemprop="articleBody">This rule provides functional testing of a single activity. The activity under test will be |
| 796 | launched before each test annotated with |
| 797 | <a href="http://junit.org/javadoc/latest/org/junit/Test.html"><code>Test</code></a> and before |
| 798 | methods annotated with |
| 799 | <a href="http://junit.sourceforge.net/javadoc/org/junit/Before.html"><code>Before</code></a>. It |
| 800 | will be terminated after the test is completed and methods annotated with |
| 801 | <a href="http://junit.sourceforge.net/javadoc/org/junit/After.html"><code>After</code></a> are |
| 802 | finished. During the duration of the test you will be able to manipulate your Activity directly.</p> |
| 803 | |
| 804 | |
| 805 | |
| 806 | |
| 807 | |
| 808 | </div><!-- jd-descr --> |
| 809 | |
| 810 | |
| 811 | |
| 812 | |
| 813 | |
| 814 | |
| 815 | |
| 816 | |
| 817 | |
| 818 | |
| 819 | |
| 820 | |
| 821 | |
| 822 | |
| 823 | |
| 824 | |
| 825 | <div class="jd-descr"> |
| 826 | |
| 827 | |
| 828 | <h2>Summary</h2> |
| 829 | |
| 830 | |
| 831 | |
| 832 | |
| 833 | |
| 834 | |
| 835 | |
| 836 | |
| 837 | |
| 838 | |
| 839 | |
| 840 | |
| 841 | |
| 842 | |
| 843 | |
| 844 | |
| 845 | |
| 846 | |
| 847 | |
| 848 | |
| 849 | |
| 850 | |
| 851 | |
| 852 | <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| 853 | <table id="pubctors" class="jd-sumtable"><tr><th colspan="12">Public Constructors</th></tr> |
| 854 | |
| 855 | |
| 856 | |
| 857 | |
| 858 | <tr class="alt-color api apilevel-" > |
| 859 | <td class="jd-typecol"><nobr> |
| 860 | |
| 861 | |
| 862 | |
| 863 | |
| 864 | |
| 865 | </nobr> |
| 866 | </td> |
| 867 | <td class="jd-linkcol" width="100%"><nobr> |
| 868 | <span class="sympad"><a href="../../../../../reference/android/support/test/rule/ActivityTestRule.html#ActivityTestRule(java.lang.Class<T>)">ActivityTestRule</a></span>(Class<T> activityClass)</nobr> |
| 869 | |
| 870 | <div class="jd-descrdiv"> |
| 871 | Similar to <code><a href="../../../../../reference/android/support/test/rule/ActivityTestRule.html#ActivityTestRule(java.lang.Class<T>, boolean, boolean)">ActivityTestRule(Class, boolean, boolean)</a></code> but with "touch mode" disabled. |
| 872 | |
| 873 | |
| 874 | |
| 875 | </div> |
| 876 | |
| 877 | </td></tr> |
| 878 | |
| 879 | |
| 880 | |
| 881 | <tr class=" api apilevel-" > |
| 882 | <td class="jd-typecol"><nobr> |
| 883 | |
| 884 | |
| 885 | |
| 886 | |
| 887 | |
| 888 | </nobr> |
| 889 | </td> |
| 890 | <td class="jd-linkcol" width="100%"><nobr> |
| 891 | <span class="sympad"><a href="../../../../../reference/android/support/test/rule/ActivityTestRule.html#ActivityTestRule(java.lang.Class<T>, boolean)">ActivityTestRule</a></span>(Class<T> activityClass, boolean initialTouchMode)</nobr> |
| 892 | |
| 893 | <div class="jd-descrdiv"> |
| 894 | Similar to <code><a href="../../../../../reference/android/support/test/rule/ActivityTestRule.html#ActivityTestRule(java.lang.Class<T>, boolean, boolean)">ActivityTestRule(Class, boolean, boolean)</a></code> but defaults to launch the |
| 895 | activity under test once per |
| 896 | <a href="http://junit.org/javadoc/latest/org/junit/Test.html"><code>Test</code></a> method. |
| 897 | |
| 898 | |
| 899 | |
| 900 | </div> |
| 901 | |
| 902 | </td></tr> |
| 903 | |
| 904 | |
| 905 | |
| 906 | <tr class="alt-color api apilevel-" > |
| 907 | <td class="jd-typecol"><nobr> |
| 908 | |
| 909 | |
| 910 | |
| 911 | |
| 912 | |
| 913 | </nobr> |
| 914 | </td> |
| 915 | <td class="jd-linkcol" width="100%"><nobr> |
| 916 | <span class="sympad"><a href="../../../../../reference/android/support/test/rule/ActivityTestRule.html#ActivityTestRule(java.lang.Class<T>, boolean, boolean)">ActivityTestRule</a></span>(Class<T> activityClass, boolean initialTouchMode, boolean launchActivity)</nobr> |
| 917 | |
| 918 | <div class="jd-descrdiv"> |
| 919 | Creates an <code><a href="../../../../../reference/android/support/test/rule/ActivityTestRule.html">ActivityTestRule</a></code> for the Activity under test. |
| 920 | |
| 921 | |
| 922 | |
| 923 | </div> |
| 924 | |
| 925 | </td></tr> |
| 926 | |
| 927 | |
| 928 | |
| 929 | </table> |
| 930 | |
| 931 | |
| 932 | |
| 933 | |
| 934 | |
| 935 | |
| 936 | <!-- ========== METHOD SUMMARY =========== --> |
| 937 | <table id="pubmethods" class="jd-sumtable"><tr><th colspan="12">Public Methods</th></tr> |
| 938 | |
| 939 | |
| 940 | |
| 941 | |
| 942 | <tr class="alt-color api apilevel-" > |
| 943 | <td class="jd-typecol"><nobr> |
| 944 | |
| 945 | |
| 946 | |
| 947 | |
| 948 | |
| 949 | Statement</nobr> |
| 950 | </td> |
| 951 | <td class="jd-linkcol" width="100%"><nobr> |
| 952 | <span class="sympad"><a href="../../../../../reference/android/support/test/rule/ActivityTestRule.html#apply(org.junit.runners.model.Statement, org.junit.runner.Description)">apply</a></span>(Statement base, Description description)</nobr> |
| 953 | |
| 954 | </td></tr> |
| 955 | |
| 956 | |
| 957 | |
| 958 | <tr class=" api apilevel-" > |
| 959 | <td class="jd-typecol"><nobr> |
| 960 | |
| 961 | |
| 962 | |
| 963 | |
| 964 | |
| 965 | T</nobr> |
| 966 | </td> |
| 967 | <td class="jd-linkcol" width="100%"><nobr> |
| 968 | <span class="sympad"><a href="../../../../../reference/android/support/test/rule/ActivityTestRule.html#getActivity()">getActivity</a></span>()</nobr> |
| 969 | |
| 970 | </td></tr> |
| 971 | |
| 972 | |
| 973 | |
| 974 | <tr class="alt-color api apilevel-" > |
| 975 | <td class="jd-typecol"><nobr> |
| 976 | |
| 977 | |
| 978 | |
| 979 | |
| 980 | |
| 981 | T</nobr> |
| 982 | </td> |
| 983 | <td class="jd-linkcol" width="100%"><nobr> |
| 984 | <span class="sympad"><a href="../../../../../reference/android/support/test/rule/ActivityTestRule.html#launchActivity(android.content.Intent)">launchActivity</a></span>(Intent startIntent)</nobr> |
| 985 | |
| 986 | <div class="jd-descrdiv"> |
| 987 | Launches the Activity under test. |
| 988 | |
| 989 | |
| 990 | |
| 991 | </div> |
| 992 | |
| 993 | </td></tr> |
| 994 | |
| 995 | |
| 996 | |
| 997 | </table> |
| 998 | |
| 999 | |
| 1000 | |
| 1001 | |
| 1002 | <!-- ========== METHOD SUMMARY =========== --> |
| 1003 | <table id="promethods" class="jd-sumtable"><tr><th colspan="12">Protected Methods</th></tr> |
| 1004 | |
| 1005 | |
| 1006 | |
| 1007 | |
| 1008 | <tr class="alt-color api apilevel-" > |
| 1009 | <td class="jd-typecol"><nobr> |
| 1010 | |
| 1011 | |
| 1012 | |
| 1013 | |
| 1014 | |
| 1015 | void</nobr> |
| 1016 | </td> |
| 1017 | <td class="jd-linkcol" width="100%"><nobr> |
| 1018 | <span class="sympad"><a href="../../../../../reference/android/support/test/rule/ActivityTestRule.html#afterActivityFinished()">afterActivityFinished</a></span>()</nobr> |
| 1019 | |
| 1020 | <div class="jd-descrdiv"> |
| 1021 | Override this method to execute any code that should run after your <code><a href="../../../../../reference/android/app/Activity.html">Activity</a></code> is |
| 1022 | finished. |
| 1023 | |
| 1024 | |
| 1025 | |
| 1026 | </div> |
| 1027 | |
| 1028 | </td></tr> |
| 1029 | |
| 1030 | |
| 1031 | |
| 1032 | <tr class=" api apilevel-" > |
| 1033 | <td class="jd-typecol"><nobr> |
| 1034 | |
| 1035 | |
| 1036 | |
| 1037 | |
| 1038 | |
| 1039 | void</nobr> |
| 1040 | </td> |
| 1041 | <td class="jd-linkcol" width="100%"><nobr> |
| 1042 | <span class="sympad"><a href="../../../../../reference/android/support/test/rule/ActivityTestRule.html#afterActivityLaunched()">afterActivityLaunched</a></span>()</nobr> |
| 1043 | |
| 1044 | <div class="jd-descrdiv"> |
| 1045 | Override this method to execute any code that should run after your <code><a href="../../../../../reference/android/app/Activity.html">Activity</a></code> is |
| 1046 | launched, but before any test code is run including any method annotated with |
| 1047 | <a href="http://junit.sourceforge.net/javadoc/org/junit/Before.html"><code>Before</code></a>. |
| 1048 | |
| 1049 | |
| 1050 | |
| 1051 | </div> |
| 1052 | |
| 1053 | </td></tr> |
| 1054 | |
| 1055 | |
| 1056 | |
| 1057 | <tr class="alt-color api apilevel-" > |
| 1058 | <td class="jd-typecol"><nobr> |
| 1059 | |
| 1060 | |
| 1061 | |
| 1062 | |
| 1063 | |
| 1064 | void</nobr> |
| 1065 | </td> |
| 1066 | <td class="jd-linkcol" width="100%"><nobr> |
| 1067 | <span class="sympad"><a href="../../../../../reference/android/support/test/rule/ActivityTestRule.html#beforeActivityLaunched()">beforeActivityLaunched</a></span>()</nobr> |
| 1068 | |
| 1069 | <div class="jd-descrdiv"> |
| 1070 | Override this method to execute any code that should run before your <code><a href="../../../../../reference/android/app/Activity.html">Activity</a></code> is |
| 1071 | created and launched. |
| 1072 | |
| 1073 | |
| 1074 | |
| 1075 | </div> |
| 1076 | |
| 1077 | </td></tr> |
| 1078 | |
| 1079 | |
| 1080 | |
| 1081 | <tr class=" api apilevel-" > |
| 1082 | <td class="jd-typecol"><nobr> |
| 1083 | |
| 1084 | |
| 1085 | |
| 1086 | |
| 1087 | |
| 1088 | Intent</nobr> |
| 1089 | </td> |
| 1090 | <td class="jd-linkcol" width="100%"><nobr> |
| 1091 | <span class="sympad"><a href="../../../../../reference/android/support/test/rule/ActivityTestRule.html#getActivityIntent()">getActivityIntent</a></span>()</nobr> |
| 1092 | |
| 1093 | <div class="jd-descrdiv"> |
| 1094 | Override this method to set up Intent as if supplied to |
| 1095 | <code><a href="../../../../../reference/android/content/Context.html#startActivity(android.content.Intent)">startActivity(Intent)</a></code>. |
| 1096 | |
| 1097 | |
| 1098 | |
| 1099 | </div> |
| 1100 | |
| 1101 | </td></tr> |
| 1102 | |
| 1103 | |
| 1104 | |
| 1105 | </table> |
| 1106 | |
| 1107 | |
| 1108 | |
| 1109 | |
| 1110 | |
| 1111 | <!-- ========== METHOD SUMMARY =========== --> |
| 1112 | <table id="inhmethods" class="jd-sumtable"><tr><th> |
| 1113 | <a href="#" class="toggle-all" onclick="return toggleAllInherited(this, null)">[Expand]</a> |
| 1114 | <div style="clear:left;">Inherited Methods</div></th></tr> |
| 1115 | |
| 1116 | |
| 1117 | <tr class="api apilevel-" > |
| 1118 | <td colspan="12"> |
| 1119 | <a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-android.support.test.rule.UiThreadTestRule" class="jd-expando-trigger closed" |
| 1120 | ><img id="inherited-methods-android.support.test.rule.UiThreadTestRule-trigger" |
| 1121 | src="../../../../../assets/images/triangle-closed.png" |
| 1122 | class="jd-expando-trigger-img" /></a> |
| 1123 | From class |
| 1124 | |
| 1125 | <a href="../../../../../reference/android/support/test/rule/UiThreadTestRule.html">android.support.test.rule.UiThreadTestRule</a> |
| 1126 | |
| 1127 | <div id="inherited-methods-android.support.test.rule.UiThreadTestRule"> |
| 1128 | <div id="inherited-methods-android.support.test.rule.UiThreadTestRule-list" |
| 1129 | class="jd-inheritedlinks"> |
| 1130 | </div> |
| 1131 | <div id="inherited-methods-android.support.test.rule.UiThreadTestRule-summary" style="display: none;"> |
| 1132 | <table class="jd-sumtable-expando"> |
| 1133 | |
| 1134 | |
| 1135 | |
| 1136 | |
| 1137 | <tr class="alt-color api apilevel-" > |
| 1138 | <td class="jd-typecol"><nobr> |
| 1139 | |
| 1140 | |
| 1141 | |
| 1142 | |
| 1143 | |
| 1144 | Statement</nobr> |
| 1145 | </td> |
| 1146 | <td class="jd-linkcol" width="100%"><nobr> |
| 1147 | <span class="sympad"><a href="../../../../../reference/android/support/test/rule/UiThreadTestRule.html#apply(org.junit.runners.model.Statement, org.junit.runner.Description)">apply</a></span>(Statement base, Description description)</nobr> |
| 1148 | |
| 1149 | </td></tr> |
| 1150 | |
| 1151 | |
| 1152 | |
| 1153 | <tr class=" api apilevel-" > |
| 1154 | <td class="jd-typecol"><nobr> |
| 1155 | |
| 1156 | |
| 1157 | |
| 1158 | |
| 1159 | |
| 1160 | void</nobr> |
| 1161 | </td> |
| 1162 | <td class="jd-linkcol" width="100%"><nobr> |
| 1163 | <span class="sympad"><a href="../../../../../reference/android/support/test/rule/UiThreadTestRule.html#runOnUiThread(java.lang.Runnable)">runOnUiThread</a></span>(Runnable runnable)</nobr> |
| 1164 | |
| 1165 | <div class="jd-descrdiv"> |
| 1166 | Helper for running portions of a test on the UI thread. |
| 1167 | |
| 1168 | |
| 1169 | |
| 1170 | </div> |
| 1171 | |
| 1172 | </td></tr> |
| 1173 | |
| 1174 | |
| 1175 | |
| 1176 | <tr class="alt-color api apilevel-" > |
| 1177 | <td class="jd-typecol"><nobr> |
| 1178 | |
| 1179 | |
| 1180 | |
| 1181 | |
| 1182 | |
| 1183 | boolean</nobr> |
| 1184 | </td> |
| 1185 | <td class="jd-linkcol" width="100%"><nobr> |
| 1186 | <span class="sympad"><a href="../../../../../reference/android/support/test/rule/UiThreadTestRule.html#shouldRunOnUiThread(org.junit.runner.Description)">shouldRunOnUiThread</a></span>(Description description)</nobr> |
| 1187 | |
| 1188 | </td></tr> |
| 1189 | |
| 1190 | |
| 1191 | </table> |
| 1192 | </div> |
| 1193 | </div> |
| 1194 | </td></tr> |
| 1195 | |
| 1196 | |
| 1197 | |
| 1198 | <tr class="api apilevel-" > |
| 1199 | <td colspan="12"> |
| 1200 | <a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-java.lang.Object" class="jd-expando-trigger closed" |
| 1201 | ><img id="inherited-methods-java.lang.Object-trigger" |
| 1202 | src="../../../../../assets/images/triangle-closed.png" |
| 1203 | class="jd-expando-trigger-img" /></a> |
| 1204 | From class |
| 1205 | |
| 1206 | java.lang.Object |
| 1207 | |
| 1208 | <div id="inherited-methods-java.lang.Object"> |
| 1209 | <div id="inherited-methods-java.lang.Object-list" |
| 1210 | class="jd-inheritedlinks"> |
| 1211 | </div> |
| 1212 | <div id="inherited-methods-java.lang.Object-summary" style="display: none;"> |
| 1213 | <table class="jd-sumtable-expando"> |
| 1214 | |
| 1215 | |
| 1216 | |
| 1217 | |
| 1218 | <tr class="alt-color api apilevel-" > |
| 1219 | <td class="jd-typecol"><nobr> |
| 1220 | |
| 1221 | |
| 1222 | |
| 1223 | |
| 1224 | |
| 1225 | Object</nobr> |
| 1226 | </td> |
| 1227 | <td class="jd-linkcol" width="100%"><nobr> |
| 1228 | <span class="sympad">clone</span>()</nobr> |
| 1229 | |
| 1230 | </td></tr> |
| 1231 | |
| 1232 | |
| 1233 | |
| 1234 | <tr class=" api apilevel-" > |
| 1235 | <td class="jd-typecol"><nobr> |
| 1236 | |
| 1237 | |
| 1238 | |
| 1239 | |
| 1240 | |
| 1241 | boolean</nobr> |
| 1242 | </td> |
| 1243 | <td class="jd-linkcol" width="100%"><nobr> |
| 1244 | <span class="sympad">equals</span>(Object arg0)</nobr> |
| 1245 | |
| 1246 | </td></tr> |
| 1247 | |
| 1248 | |
| 1249 | |
| 1250 | <tr class="alt-color api apilevel-" > |
| 1251 | <td class="jd-typecol"><nobr> |
| 1252 | |
| 1253 | |
| 1254 | |
| 1255 | |
| 1256 | |
| 1257 | void</nobr> |
| 1258 | </td> |
| 1259 | <td class="jd-linkcol" width="100%"><nobr> |
| 1260 | <span class="sympad">finalize</span>()</nobr> |
| 1261 | |
| 1262 | </td></tr> |
| 1263 | |
| 1264 | |
| 1265 | |
| 1266 | <tr class=" api apilevel-" > |
| 1267 | <td class="jd-typecol"><nobr> |
| 1268 | |
| 1269 | |
| 1270 | final |
| 1271 | |
| 1272 | |
| 1273 | Class<?></nobr> |
| 1274 | </td> |
| 1275 | <td class="jd-linkcol" width="100%"><nobr> |
| 1276 | <span class="sympad">getClass</span>()</nobr> |
| 1277 | |
| 1278 | </td></tr> |
| 1279 | |
| 1280 | |
| 1281 | |
| 1282 | <tr class="alt-color api apilevel-" > |
| 1283 | <td class="jd-typecol"><nobr> |
| 1284 | |
| 1285 | |
| 1286 | |
| 1287 | |
| 1288 | |
| 1289 | int</nobr> |
| 1290 | </td> |
| 1291 | <td class="jd-linkcol" width="100%"><nobr> |
| 1292 | <span class="sympad">hashCode</span>()</nobr> |
| 1293 | |
| 1294 | </td></tr> |
| 1295 | |
| 1296 | |
| 1297 | |
| 1298 | <tr class=" api apilevel-" > |
| 1299 | <td class="jd-typecol"><nobr> |
| 1300 | |
| 1301 | |
| 1302 | final |
| 1303 | |
| 1304 | |
| 1305 | void</nobr> |
| 1306 | </td> |
| 1307 | <td class="jd-linkcol" width="100%"><nobr> |
| 1308 | <span class="sympad">notify</span>()</nobr> |
| 1309 | |
| 1310 | </td></tr> |
| 1311 | |
| 1312 | |
| 1313 | |
| 1314 | <tr class="alt-color api apilevel-" > |
| 1315 | <td class="jd-typecol"><nobr> |
| 1316 | |
| 1317 | |
| 1318 | final |
| 1319 | |
| 1320 | |
| 1321 | void</nobr> |
| 1322 | </td> |
| 1323 | <td class="jd-linkcol" width="100%"><nobr> |
| 1324 | <span class="sympad">notifyAll</span>()</nobr> |
| 1325 | |
| 1326 | </td></tr> |
| 1327 | |
| 1328 | |
| 1329 | |
| 1330 | <tr class=" api apilevel-" > |
| 1331 | <td class="jd-typecol"><nobr> |
| 1332 | |
| 1333 | |
| 1334 | |
| 1335 | |
| 1336 | |
| 1337 | String</nobr> |
| 1338 | </td> |
| 1339 | <td class="jd-linkcol" width="100%"><nobr> |
| 1340 | <span class="sympad">toString</span>()</nobr> |
| 1341 | |
| 1342 | </td></tr> |
| 1343 | |
| 1344 | |
| 1345 | |
| 1346 | <tr class="alt-color api apilevel-" > |
| 1347 | <td class="jd-typecol"><nobr> |
| 1348 | |
| 1349 | |
| 1350 | final |
| 1351 | |
| 1352 | |
| 1353 | void</nobr> |
| 1354 | </td> |
| 1355 | <td class="jd-linkcol" width="100%"><nobr> |
| 1356 | <span class="sympad">wait</span>()</nobr> |
| 1357 | |
| 1358 | </td></tr> |
| 1359 | |
| 1360 | |
| 1361 | |
| 1362 | <tr class=" api apilevel-" > |
| 1363 | <td class="jd-typecol"><nobr> |
| 1364 | |
| 1365 | |
| 1366 | final |
| 1367 | |
| 1368 | |
| 1369 | void</nobr> |
| 1370 | </td> |
| 1371 | <td class="jd-linkcol" width="100%"><nobr> |
| 1372 | <span class="sympad">wait</span>(long arg0, int arg1)</nobr> |
| 1373 | |
| 1374 | </td></tr> |
| 1375 | |
| 1376 | |
| 1377 | |
| 1378 | <tr class="alt-color api apilevel-" > |
| 1379 | <td class="jd-typecol"><nobr> |
| 1380 | |
| 1381 | |
| 1382 | final |
| 1383 | |
| 1384 | |
| 1385 | void</nobr> |
| 1386 | </td> |
| 1387 | <td class="jd-linkcol" width="100%"><nobr> |
| 1388 | <span class="sympad">wait</span>(long arg0)</nobr> |
| 1389 | |
| 1390 | </td></tr> |
| 1391 | |
| 1392 | |
| 1393 | </table> |
| 1394 | </div> |
| 1395 | </div> |
| 1396 | </td></tr> |
| 1397 | |
| 1398 | |
| 1399 | |
| 1400 | <tr class="api apilevel-" > |
| 1401 | <td colspan="12"> |
| 1402 | <a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-org.junit.rules.TestRule" class="jd-expando-trigger closed" |
| 1403 | ><img id="inherited-methods-org.junit.rules.TestRule-trigger" |
| 1404 | src="../../../../../assets/images/triangle-closed.png" |
| 1405 | class="jd-expando-trigger-img" /></a> |
| 1406 | From interface |
| 1407 | |
| 1408 | org.junit.rules.TestRule |
| 1409 | |
| 1410 | <div id="inherited-methods-org.junit.rules.TestRule"> |
| 1411 | <div id="inherited-methods-org.junit.rules.TestRule-list" |
| 1412 | class="jd-inheritedlinks"> |
| 1413 | </div> |
| 1414 | <div id="inherited-methods-org.junit.rules.TestRule-summary" style="display: none;"> |
| 1415 | <table class="jd-sumtable-expando"> |
| 1416 | |
| 1417 | |
| 1418 | |
| 1419 | |
| 1420 | <tr class="alt-color api apilevel-" > |
| 1421 | <td class="jd-typecol"><nobr> |
| 1422 | abstract |
| 1423 | |
| 1424 | |
| 1425 | |
| 1426 | |
| 1427 | Statement</nobr> |
| 1428 | </td> |
| 1429 | <td class="jd-linkcol" width="100%"><nobr> |
| 1430 | <span class="sympad">apply</span>(Statement arg0, Description arg1)</nobr> |
| 1431 | |
| 1432 | </td></tr> |
| 1433 | |
| 1434 | |
| 1435 | </table> |
| 1436 | </div> |
| 1437 | </div> |
| 1438 | </td></tr> |
| 1439 | |
| 1440 | |
| 1441 | </table> |
| 1442 | |
| 1443 | |
| 1444 | </div><!-- jd-descr (summary) --> |
| 1445 | |
| 1446 | <!-- Details --> |
| 1447 | |
| 1448 | |
| 1449 | |
| 1450 | |
| 1451 | |
| 1452 | |
| 1453 | |
| 1454 | |
| 1455 | <!-- XML Attributes --> |
| 1456 | |
| 1457 | |
| 1458 | <!-- Enum Values --> |
| 1459 | |
| 1460 | |
| 1461 | <!-- Constants --> |
| 1462 | |
| 1463 | |
| 1464 | <!-- Fields --> |
| 1465 | |
| 1466 | |
| 1467 | <!-- Public ctors --> |
| 1468 | |
| 1469 | |
| 1470 | <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| 1471 | <h2>Public Constructors</h2> |
| 1472 | |
| 1473 | |
| 1474 | |
| 1475 | <A NAME="ActivityTestRule(java.lang.Class<T>)"></A> |
| 1476 | |
| 1477 | <div class="jd-details api apilevel-"> |
| 1478 | <h4 class="jd-details-title"> |
| 1479 | <span class="normal"> |
| 1480 | public |
| 1481 | |
| 1482 | |
| 1483 | |
| 1484 | |
| 1485 | |
| 1486 | </span> |
| 1487 | <span class="sympad">ActivityTestRule</span> |
| 1488 | <span class="normal">(Class<T> activityClass)</span> |
| 1489 | </h4> |
| 1490 | <div class="api-level"> |
| 1491 | <div></div> |
| 1492 | |
| 1493 | |
| 1494 | |
| 1495 | </div> |
| 1496 | <div class="jd-details-descr"> |
| 1497 | |
| 1498 | |
| 1499 | |
| 1500 | |
| 1501 | <div class="jd-tagdata jd-tagdescr"><p>Similar to <code><a href="../../../../../reference/android/support/test/rule/ActivityTestRule.html#ActivityTestRule(java.lang.Class<T>, boolean, boolean)">ActivityTestRule(Class, boolean, boolean)</a></code> but with "touch mode" disabled.</p></div> |
| 1502 | <div class="jd-tagdata"> |
| 1503 | <h5 class="jd-tagtitle">Parameters</h5> |
| 1504 | <table class="jd-tagtable"> |
| 1505 | <tr> |
| 1506 | <th>activityClass</td> |
| 1507 | <td>The activity under test. This must be a class in the instrumentation |
| 1508 | targetPackage specified in the AndroidManifest.xml</td> |
| 1509 | </tr> |
| 1510 | </table> |
| 1511 | </div> |
| 1512 | <div class="jd-tagdata"> |
| 1513 | <h5 class="jd-tagtitle">See Also</h5> |
| 1514 | <ul class="nolist"><li><code><a href="../../../../../reference/android/support/test/rule/ActivityTestRule.html#ActivityTestRule(java.lang.Class<T>, boolean, boolean)">ActivityTestRule(Class, boolean, boolean)</a></code></li> |
| 1515 | </ul> |
| 1516 | </div> |
| 1517 | |
| 1518 | </div> |
| 1519 | </div> |
| 1520 | |
| 1521 | |
| 1522 | <A NAME="ActivityTestRule(java.lang.Class<T>, boolean)"></A> |
| 1523 | |
| 1524 | <div class="jd-details api apilevel-"> |
| 1525 | <h4 class="jd-details-title"> |
| 1526 | <span class="normal"> |
| 1527 | public |
| 1528 | |
| 1529 | |
| 1530 | |
| 1531 | |
| 1532 | |
| 1533 | </span> |
| 1534 | <span class="sympad">ActivityTestRule</span> |
| 1535 | <span class="normal">(Class<T> activityClass, boolean initialTouchMode)</span> |
| 1536 | </h4> |
| 1537 | <div class="api-level"> |
| 1538 | <div></div> |
| 1539 | |
| 1540 | |
| 1541 | |
| 1542 | </div> |
| 1543 | <div class="jd-details-descr"> |
| 1544 | |
| 1545 | |
| 1546 | |
| 1547 | |
| 1548 | <div class="jd-tagdata jd-tagdescr"><p>Similar to <code><a href="../../../../../reference/android/support/test/rule/ActivityTestRule.html#ActivityTestRule(java.lang.Class<T>, boolean, boolean)">ActivityTestRule(Class, boolean, boolean)</a></code> but defaults to launch the |
| 1549 | activity under test once per |
| 1550 | <a href="http://junit.org/javadoc/latest/org/junit/Test.html"><code>Test</code></a> method. |
| 1551 | It is launched before the first |
| 1552 | <a href="http://junit.sourceforge.net/javadoc/org/junit/Before.html"><code>Before</code></a> |
| 1553 | method, and terminated after the last |
| 1554 | <a href="http://junit.sourceforge.net/javadoc/org/junit/After.html"><code>After</code></a> |
| 1555 | method.</p></div> |
| 1556 | <div class="jd-tagdata"> |
| 1557 | <h5 class="jd-tagtitle">Parameters</h5> |
| 1558 | <table class="jd-tagtable"> |
| 1559 | <tr> |
| 1560 | <th>activityClass</td> |
| 1561 | <td>The activity under test. This must be a class in the instrumentation |
| 1562 | targetPackage specified in the AndroidManifest.xml</td> |
| 1563 | </tr> |
| 1564 | <tr> |
| 1565 | <th>initialTouchMode</td> |
| 1566 | <td>true if the Activity should be placed into "touch mode" when started</td> |
| 1567 | </tr> |
| 1568 | </table> |
| 1569 | </div> |
| 1570 | <div class="jd-tagdata"> |
| 1571 | <h5 class="jd-tagtitle">See Also</h5> |
| 1572 | <ul class="nolist"><li><code><a href="../../../../../reference/android/support/test/rule/ActivityTestRule.html#ActivityTestRule(java.lang.Class<T>, boolean, boolean)">ActivityTestRule(Class, boolean, boolean)</a></code></li> |
| 1573 | </ul> |
| 1574 | </div> |
| 1575 | |
| 1576 | </div> |
| 1577 | </div> |
| 1578 | |
| 1579 | |
| 1580 | <A NAME="ActivityTestRule(java.lang.Class<T>, boolean, boolean)"></A> |
| 1581 | |
| 1582 | <div class="jd-details api apilevel-"> |
| 1583 | <h4 class="jd-details-title"> |
| 1584 | <span class="normal"> |
| 1585 | public |
| 1586 | |
| 1587 | |
| 1588 | |
| 1589 | |
| 1590 | |
| 1591 | </span> |
| 1592 | <span class="sympad">ActivityTestRule</span> |
| 1593 | <span class="normal">(Class<T> activityClass, boolean initialTouchMode, boolean launchActivity)</span> |
| 1594 | </h4> |
| 1595 | <div class="api-level"> |
| 1596 | <div></div> |
| 1597 | |
| 1598 | |
| 1599 | |
| 1600 | </div> |
| 1601 | <div class="jd-details-descr"> |
| 1602 | |
| 1603 | |
| 1604 | |
| 1605 | |
| 1606 | <div class="jd-tagdata jd-tagdescr"><p>Creates an <code><a href="../../../../../reference/android/support/test/rule/ActivityTestRule.html">ActivityTestRule</a></code> for the Activity under test.</p></div> |
| 1607 | <div class="jd-tagdata"> |
| 1608 | <h5 class="jd-tagtitle">Parameters</h5> |
| 1609 | <table class="jd-tagtable"> |
| 1610 | <tr> |
| 1611 | <th>activityClass</td> |
| 1612 | <td>The activity under test. This must be a class in the instrumentation |
| 1613 | targetPackage specified in the AndroidManifest.xml</td> |
| 1614 | </tr> |
| 1615 | <tr> |
| 1616 | <th>initialTouchMode</td> |
| 1617 | <td>true if the Activity should be placed into "touch mode" when started</td> |
| 1618 | </tr> |
| 1619 | <tr> |
| 1620 | <th>launchActivity</td> |
| 1621 | <td>true if the Activity should be launched once per |
| 1622 | <a href="http://junit.org/javadoc/latest/org/junit/Test.html"> |
| 1623 | <code>Test</code></a> method. It will be launched before the first |
| 1624 | <a href="http://junit.sourceforge.net/javadoc/org/junit/Before.html"> |
| 1625 | <code>Before</code></a> method, and terminated after the last |
| 1626 | <a href="http://junit.sourceforge.net/javadoc/org/junit/After.html"> |
| 1627 | <code>After</code></a> method. |
| 1628 | </td> |
| 1629 | </tr> |
| 1630 | </table> |
| 1631 | </div> |
| 1632 | |
| 1633 | </div> |
| 1634 | </div> |
| 1635 | |
| 1636 | |
| 1637 | |
| 1638 | |
| 1639 | |
| 1640 | <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| 1641 | <!-- Protected ctors --> |
| 1642 | |
| 1643 | |
| 1644 | |
| 1645 | <!-- ========= METHOD DETAIL ======== --> |
| 1646 | <!-- Public methdos --> |
| 1647 | |
| 1648 | <h2>Public Methods</h2> |
| 1649 | |
| 1650 | |
| 1651 | |
| 1652 | <A NAME="apply(org.junit.runners.model.Statement, org.junit.runner.Description)"></A> |
| 1653 | |
| 1654 | <div class="jd-details api apilevel-"> |
| 1655 | <h4 class="jd-details-title"> |
| 1656 | <span class="normal"> |
| 1657 | public |
| 1658 | |
| 1659 | |
| 1660 | |
| 1661 | |
| 1662 | Statement |
| 1663 | </span> |
| 1664 | <span class="sympad">apply</span> |
| 1665 | <span class="normal">(Statement base, Description description)</span> |
| 1666 | </h4> |
| 1667 | <div class="api-level"> |
| 1668 | <div></div> |
| 1669 | |
| 1670 | |
| 1671 | |
| 1672 | </div> |
| 1673 | <div class="jd-details-descr"> |
| 1674 | |
| 1675 | |
| 1676 | |
| 1677 | |
| 1678 | <div class="jd-tagdata jd-tagdescr"><p></p></div> |
| 1679 | |
| 1680 | </div> |
| 1681 | </div> |
| 1682 | |
| 1683 | |
| 1684 | <A NAME="getActivity()"></A> |
| 1685 | |
| 1686 | <div class="jd-details api apilevel-"> |
| 1687 | <h4 class="jd-details-title"> |
| 1688 | <span class="normal"> |
| 1689 | public |
| 1690 | |
| 1691 | |
| 1692 | |
| 1693 | |
| 1694 | T |
| 1695 | </span> |
| 1696 | <span class="sympad">getActivity</span> |
| 1697 | <span class="normal">()</span> |
| 1698 | </h4> |
| 1699 | <div class="api-level"> |
| 1700 | <div></div> |
| 1701 | |
| 1702 | |
| 1703 | |
| 1704 | </div> |
| 1705 | <div class="jd-details-descr"> |
| 1706 | |
| 1707 | |
| 1708 | |
| 1709 | |
| 1710 | <div class="jd-tagdata jd-tagdescr"><p></p></div> |
| 1711 | <div class="jd-tagdata"> |
| 1712 | <h5 class="jd-tagtitle">Returns</h5> |
| 1713 | <ul class="nolist"><li>The activity under test. |
| 1714 | </li></ul> |
| 1715 | </div> |
| 1716 | |
| 1717 | </div> |
| 1718 | </div> |
| 1719 | |
| 1720 | |
| 1721 | <A NAME="launchActivity(android.content.Intent)"></A> |
| 1722 | |
| 1723 | <div class="jd-details api apilevel-"> |
| 1724 | <h4 class="jd-details-title"> |
| 1725 | <span class="normal"> |
| 1726 | public |
| 1727 | |
| 1728 | |
| 1729 | |
| 1730 | |
| 1731 | T |
| 1732 | </span> |
| 1733 | <span class="sympad">launchActivity</span> |
| 1734 | <span class="normal">(Intent startIntent)</span> |
| 1735 | </h4> |
| 1736 | <div class="api-level"> |
| 1737 | <div></div> |
| 1738 | |
| 1739 | |
| 1740 | |
| 1741 | </div> |
| 1742 | <div class="jd-details-descr"> |
| 1743 | |
| 1744 | |
| 1745 | |
| 1746 | |
| 1747 | <div class="jd-tagdata jd-tagdescr"><p>Launches the Activity under test. |
| 1748 | <p> |
| 1749 | Don't call this method directly, unless you explicitly requested not to launch the Activity |
| 1750 | manually using the launchActivity flag in |
| 1751 | <code><a href="../../../../../reference/android/support/test/rule/ActivityTestRule.html#ActivityTestRule(java.lang.Class<T>, boolean, boolean)">ActivityTestRule(Class, boolean, boolean)</a></code>. |
| 1752 | <p> |
| 1753 | Usage: |
| 1754 | <pre> |
| 1755 | @Test |
| 1756 | public void customIntentToStartActivity() { |
| 1757 | Intent intent = new Intent(Intent.ACTION_PICK); |
| 1758 | mActivity = mActivityRule.launchActivity(intent); |
| 1759 | } |
| 1760 | </pre></p></div> |
| 1761 | <div class="jd-tagdata"> |
| 1762 | <h5 class="jd-tagtitle">Parameters</h5> |
| 1763 | <table class="jd-tagtable"> |
| 1764 | <tr> |
| 1765 | <th>startIntent</td> |
| 1766 | <td>The Intent that will be used to start the Activity under test. If |
| 1767 | <code>startIntent</code> is null, the Intent returned by |
| 1768 | <code><a href="../../../../../reference/android/support/test/rule/ActivityTestRule.html#getActivityIntent()">getActivityIntent()</a></code> is used.</td> |
| 1769 | </tr> |
| 1770 | </table> |
| 1771 | </div> |
| 1772 | <div class="jd-tagdata"> |
| 1773 | <h5 class="jd-tagtitle">Returns</h5> |
| 1774 | <ul class="nolist"><li>the Activity launched by this rule.</li></ul> |
| 1775 | </div> |
| 1776 | <div class="jd-tagdata"> |
| 1777 | <h5 class="jd-tagtitle">See Also</h5> |
| 1778 | <ul class="nolist"><li><code><a href="../../../../../reference/android/support/test/rule/ActivityTestRule.html#getActivityIntent()">getActivityIntent()</a></code></li> |
| 1779 | </ul> |
| 1780 | </div> |
| 1781 | |
| 1782 | </div> |
| 1783 | </div> |
| 1784 | |
| 1785 | |
| 1786 | |
| 1787 | |
| 1788 | |
| 1789 | <!-- ========= METHOD DETAIL ======== --> |
| 1790 | |
| 1791 | <h2>Protected Methods</h2> |
| 1792 | |
| 1793 | |
| 1794 | |
| 1795 | <A NAME="afterActivityFinished()"></A> |
| 1796 | |
| 1797 | <div class="jd-details api apilevel-"> |
| 1798 | <h4 class="jd-details-title"> |
| 1799 | <span class="normal"> |
| 1800 | protected |
| 1801 | |
| 1802 | |
| 1803 | |
| 1804 | |
| 1805 | void |
| 1806 | </span> |
| 1807 | <span class="sympad">afterActivityFinished</span> |
| 1808 | <span class="normal">()</span> |
| 1809 | </h4> |
| 1810 | <div class="api-level"> |
| 1811 | <div></div> |
| 1812 | |
| 1813 | |
| 1814 | |
| 1815 | </div> |
| 1816 | <div class="jd-details-descr"> |
| 1817 | |
| 1818 | |
| 1819 | |
| 1820 | |
| 1821 | <div class="jd-tagdata jd-tagdescr"><p>Override this method to execute any code that should run after your <code><a href="../../../../../reference/android/app/Activity.html">Activity</a></code> is |
| 1822 | finished. |
| 1823 | This method is called after each test method, including any method annotated with |
| 1824 | <a href="http://junit.sourceforge.net/javadoc/org/junit/After.html"><code>After</code></a>. |
| 1825 | </p></div> |
| 1826 | |
| 1827 | </div> |
| 1828 | </div> |
| 1829 | |
| 1830 | |
| 1831 | <A NAME="afterActivityLaunched()"></A> |
| 1832 | |
| 1833 | <div class="jd-details api apilevel-"> |
| 1834 | <h4 class="jd-details-title"> |
| 1835 | <span class="normal"> |
| 1836 | protected |
| 1837 | |
| 1838 | |
| 1839 | |
| 1840 | |
| 1841 | void |
| 1842 | </span> |
| 1843 | <span class="sympad">afterActivityLaunched</span> |
| 1844 | <span class="normal">()</span> |
| 1845 | </h4> |
| 1846 | <div class="api-level"> |
| 1847 | <div></div> |
| 1848 | |
| 1849 | |
| 1850 | |
| 1851 | </div> |
| 1852 | <div class="jd-details-descr"> |
| 1853 | |
| 1854 | |
| 1855 | |
| 1856 | |
| 1857 | <div class="jd-tagdata jd-tagdescr"><p>Override this method to execute any code that should run after your <code><a href="../../../../../reference/android/app/Activity.html">Activity</a></code> is |
| 1858 | launched, but before any test code is run including any method annotated with |
| 1859 | <a href="http://junit.sourceforge.net/javadoc/org/junit/Before.html"><code>Before</code></a>. |
| 1860 | <p> |
| 1861 | Prefer |
| 1862 | <a href="http://junit.sourceforge.net/javadoc/org/junit/Before.html"><code>Before</code></a> |
| 1863 | over this method. This method should usually not be overwritten directly in tests and only be |
| 1864 | used by subclasses of ActivityTestRule to get notified when the activity is created and |
| 1865 | visible but test runs. |
| 1866 | </p></div> |
| 1867 | |
| 1868 | </div> |
| 1869 | </div> |
| 1870 | |
| 1871 | |
| 1872 | <A NAME="beforeActivityLaunched()"></A> |
| 1873 | |
| 1874 | <div class="jd-details api apilevel-"> |
| 1875 | <h4 class="jd-details-title"> |
| 1876 | <span class="normal"> |
| 1877 | protected |
| 1878 | |
| 1879 | |
| 1880 | |
| 1881 | |
| 1882 | void |
| 1883 | </span> |
| 1884 | <span class="sympad">beforeActivityLaunched</span> |
| 1885 | <span class="normal">()</span> |
| 1886 | </h4> |
| 1887 | <div class="api-level"> |
| 1888 | <div></div> |
| 1889 | |
| 1890 | |
| 1891 | |
| 1892 | </div> |
| 1893 | <div class="jd-details-descr"> |
| 1894 | |
| 1895 | |
| 1896 | |
| 1897 | |
| 1898 | <div class="jd-tagdata jd-tagdescr"><p>Override this method to execute any code that should run before your <code><a href="../../../../../reference/android/app/Activity.html">Activity</a></code> is |
| 1899 | created and launched. |
| 1900 | This method is called before each test method, including any method annotated with |
| 1901 | <a href="http://junit.sourceforge.net/javadoc/org/junit/Before.html"><code>Before</code></a>. |
| 1902 | </p></div> |
| 1903 | |
| 1904 | </div> |
| 1905 | </div> |
| 1906 | |
| 1907 | |
| 1908 | <A NAME="getActivityIntent()"></A> |
| 1909 | |
| 1910 | <div class="jd-details api apilevel-"> |
| 1911 | <h4 class="jd-details-title"> |
| 1912 | <span class="normal"> |
| 1913 | protected |
| 1914 | |
| 1915 | |
| 1916 | |
| 1917 | |
| 1918 | Intent |
| 1919 | </span> |
| 1920 | <span class="sympad">getActivityIntent</span> |
| 1921 | <span class="normal">()</span> |
| 1922 | </h4> |
| 1923 | <div class="api-level"> |
| 1924 | <div></div> |
| 1925 | |
| 1926 | |
| 1927 | |
| 1928 | </div> |
| 1929 | <div class="jd-details-descr"> |
| 1930 | |
| 1931 | |
| 1932 | |
| 1933 | |
| 1934 | <div class="jd-tagdata jd-tagdescr"><p>Override this method to set up Intent as if supplied to |
| 1935 | <code><a href="../../../../../reference/android/content/Context.html#startActivity(android.content.Intent)">startActivity(Intent)</a></code>. |
| 1936 | <p> |
| 1937 | The default Intent (if this method returns null or is not overwritten) is: |
| 1938 | action = <code><a href="../../../../../reference/android/content/Intent.html#ACTION_MAIN">ACTION_MAIN</a></code> |
| 1939 | flags = <code><a href="../../../../../reference/android/content/Intent.html#FLAG_ACTIVITY_NEW_TASK">FLAG_ACTIVITY_NEW_TASK</a></code> |
| 1940 | All other intent fields are null or empty.</p></div> |
| 1941 | <div class="jd-tagdata"> |
| 1942 | <h5 class="jd-tagtitle">Returns</h5> |
| 1943 | <ul class="nolist"><li>The Intent as if supplied to <code><a href="../../../../../reference/android/content/Context.html#startActivity(android.content.Intent)">startActivity(Intent)</a></code>. |
| 1944 | </li></ul> |
| 1945 | </div> |
| 1946 | |
| 1947 | </div> |
| 1948 | </div> |
| 1949 | |
| 1950 | |
| 1951 | |
| 1952 | |
| 1953 | |
| 1954 | <!-- ========= END OF CLASS DATA ========= --> |
| 1955 | <A NAME="navbar_top"></A> |
| 1956 | |
| 1957 | <div id="footer" class="wrap" > |
| 1958 | |
| 1959 | |
| 1960 | <div id="copyright"> |
| 1961 | |
| 1962 | Except as noted, this content is licensed under <a |
| 1963 | href="http://www.apache.org/licenses/LICENSE-2.0">Apache 2.0</a>. |
| 1964 | For details and restrictions, see the <a href="../../../../../license.html"> |
| 1965 | Content License</a>. |
| 1966 | </div> |
| 1967 | <div id="build_info"> |
| 1968 | |
| 1969 | Android r — |
| 1970 | <script src="../../../../../timestamp.js" type="text/javascript"></script> |
| 1971 | <script>document.write(BUILD_TIMESTAMP)</script> |
| 1972 | |
| 1973 | </div> |
| 1974 | |
| 1975 | |
| 1976 | <div id="footerlinks"> |
| 1977 | |
| 1978 | <p> |
| 1979 | <a href="../../../../../about/index.html">About Android</a> | |
| 1980 | <a href="../../../../../legal.html">Legal</a> | |
| 1981 | <a href="../../../../../support.html">Support</a> |
| 1982 | </p> |
| 1983 | </div> |
| 1984 | |
| 1985 | </div> <!-- end footer --> |
| 1986 | </div> <!-- jd-content --> |
| 1987 | |
| 1988 | </div><!-- end doc-content --> |
| 1989 | |
| 1990 | </div> <!-- end body-content --> |
| 1991 | |
| 1992 | |
| 1993 | |
| 1994 | |
| 1995 | |
| 1996 | |
| 1997 | </body> |
| 1998 | </html> |