blob: 005fce8b01f5176a798fdc77a80c5a8be0e9f53b [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
Quddus Chong900831f2015-04-17 15:01:16 -070098
Quddus Chong489218c2015-02-26 16:38:46 -080099<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>AdapterViewProtocol | Android Developers</title>
108
109<!-- STYLESHEETS -->
110<link rel="stylesheet"
111href="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">
Quddus Chong900831f2015-04-17 15:01:16 -0700114<link href="../../../../../../assets/css/default.css?v=5" rel="stylesheet" type="text/css">
Quddus Chong489218c2015-02-26 16:38:46 -0800115
116
117<!-- FULLSCREEN STYLESHEET -->
118<link href="../../../../../../assets/css/fullscreen.css" rel="stylesheet" class="fullscreen"
119type="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>
Quddus Chong900831f2015-04-17 15:01:16 -0700130<script src="../../../../../../assets/js/docs.js?v=3" type="text/javascript"></script>
131
132
Quddus Chong489218c2015-02-26 16:38:46 -0800133
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
Quddus Chong900831f2015-04-17 15:01:16 -0700156<!-- 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
Quddus Chong489218c2015-02-26 16:38:46 -0800202 <!-- 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">&nbsp;</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 &amp; Retain</a></li>
397 <li><a href="../../../../../../distribute/monetize/index.html">Monetize</a></li>
Quddus Chong900831f2015-04-17 15:01:16 -0700398 <li><a href="../../../../../../distribute/analyze/index.html">Analyze</a></li>
Quddus Chong489218c2015-02-26 16:38:46 -0800399 <li><a href="../../../../../../distribute/tools/index.html">Tools &amp; 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
Quddus Chong489218c2015-02-26 16:38:46 -0800414
Quddus Chong489218c2015-02-26 16:38:46 -0800415
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">AdapterViewProtocol</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-">
Quddus Chong900831f2015-04-17 15:01:16 -0700512 <a href="../../../../../../reference/android/support/test/annotation/package-summary.html">android.support.test.annotation</a></li>
513 <li class="api apilevel-">
Quddus Chong489218c2015-02-26 16:38:46 -0800514 <a href="../../../../../../reference/android/support/test/espresso/package-summary.html">android.support.test.espresso</a></li>
515 <li class="selected 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-">
Quddus Chong900831f2015-04-17 15:01:16 -0700524 <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-">
Quddus Chong489218c2015-02-26 16:38:46 -0800530 <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="api apilevel-">
Quddus Chong900831f2015-04-17 15:01:16 -0700536 <a href="../../../../../../reference/android/support/test/rule/package-summary.html">android.support.test.rule</a></li>
537 <li class="api apilevel-">
Quddus Chong489218c2015-02-26 16:38:46 -0800538 <a href="../../../../../../reference/android/support/test/runner/package-summary.html">android.support.test.runner</a></li>
539 <li class="api apilevel-">
Quddus Chong900831f2015-04-17 15:01:16 -0700540 <a href="../../../../../../reference/android/support/test/runner/intent/package-summary.html">android.support.test.runner.intent</a></li>
541 <li class="api apilevel-">
Quddus Chong489218c2015-02-26 16:38:46 -0800542 <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 <li><h2>Interfaces</h2>
557 <ul>
558 <li class="selected api apilevel-"><a href="../../../../../../reference/android/support/test/espresso/action/AdapterViewProtocol.html">AdapterViewProtocol</a></li>
559 <li class="api apilevel-"><a href="../../../../../../reference/android/support/test/espresso/action/AdapterViewProtocol.DataFunction.html">AdapterViewProtocol.DataFunction</a></li>
560 <li class="api apilevel-"><a href="../../../../../../reference/android/support/test/espresso/action/CoordinatesProvider.html">CoordinatesProvider</a></li>
561 <li class="api apilevel-"><a href="../../../../../../reference/android/support/test/espresso/action/PrecisionDescriber.html">PrecisionDescriber</a></li>
562 <li class="api apilevel-"><a href="../../../../../../reference/android/support/test/espresso/action/Swiper.html">Swiper</a></li>
563 <li class="api apilevel-"><a href="../../../../../../reference/android/support/test/espresso/action/Tapper.html">Tapper</a></li>
564 </ul>
565 </li>
566
567 <li><h2>Classes</h2>
568 <ul>
569 <li class="api apilevel-"><a href="../../../../../../reference/android/support/test/espresso/action/AdapterDataLoaderAction.html">AdapterDataLoaderAction</a></li>
570 <li class="api apilevel-"><a href="../../../../../../reference/android/support/test/espresso/action/AdapterViewProtocol.AdaptedData.html">AdapterViewProtocol.AdaptedData</a></li>
571 <li class="api apilevel-"><a href="../../../../../../reference/android/support/test/espresso/action/AdapterViewProtocol.AdaptedData.Builder.html">AdapterViewProtocol.AdaptedData.Builder</a></li>
572 <li class="api apilevel-"><a href="../../../../../../reference/android/support/test/espresso/action/AdapterViewProtocols.html">AdapterViewProtocols</a></li>
573 <li class="api apilevel-"><a href="../../../../../../reference/android/support/test/espresso/action/CloseKeyboardAction.html">CloseKeyboardAction</a></li>
574 <li class="api apilevel-"><a href="../../../../../../reference/android/support/test/espresso/action/EditorAction.html">EditorAction</a></li>
575 <li class="api apilevel-"><a href="../../../../../../reference/android/support/test/espresso/action/EspressoKey.html">EspressoKey</a></li>
576 <li class="api apilevel-"><a href="../../../../../../reference/android/support/test/espresso/action/EspressoKey.Builder.html">EspressoKey.Builder</a></li>
577 <li class="api apilevel-"><a href="../../../../../../reference/android/support/test/espresso/action/GeneralClickAction.html">GeneralClickAction</a></li>
578 <li class="api apilevel-"><a href="../../../../../../reference/android/support/test/espresso/action/GeneralSwipeAction.html">GeneralSwipeAction</a></li>
579 <li class="api apilevel-"><a href="../../../../../../reference/android/support/test/espresso/action/KeyEventAction.html">KeyEventAction</a></li>
Quddus Chong900831f2015-04-17 15:01:16 -0700580 <li class="api apilevel-"><a href="../../../../../../reference/android/support/test/espresso/action/MotionEvents.html">MotionEvents</a></li>
581 <li class="api apilevel-"><a href="../../../../../../reference/android/support/test/espresso/action/MotionEvents.DownResultHolder.html">MotionEvents.DownResultHolder</a></li>
Quddus Chong489218c2015-02-26 16:38:46 -0800582 <li class="api apilevel-"><a href="../../../../../../reference/android/support/test/espresso/action/OpenLinkAction.html">OpenLinkAction</a></li>
583 <li class="api apilevel-"><a href="../../../../../../reference/android/support/test/espresso/action/ReplaceTextAction.html">ReplaceTextAction</a></li>
584 <li class="api apilevel-"><a href="../../../../../../reference/android/support/test/espresso/action/ScrollToAction.html">ScrollToAction</a></li>
585 <li class="api apilevel-"><a href="../../../../../../reference/android/support/test/espresso/action/TypeTextAction.html">TypeTextAction</a></li>
586 <li class="api apilevel-"><a href="../../../../../../reference/android/support/test/espresso/action/ViewActions.html">ViewActions</a></li>
587 </ul>
588 </li>
589
590 <li><h2>Enums</h2>
591 <ul>
592 <li class="api apilevel-"><a href="../../../../../../reference/android/support/test/espresso/action/GeneralLocation.html">GeneralLocation</a></li>
593 <li class="api apilevel-"><a href="../../../../../../reference/android/support/test/espresso/action/Press.html">Press</a></li>
594 <li class="api apilevel-"><a href="../../../../../../reference/android/support/test/espresso/action/Swipe.html">Swipe</a></li>
595 <li class="api apilevel-"><a href="../../../../../../reference/android/support/test/espresso/action/Swiper.Status.html">Swiper.Status</a></li>
596 <li class="api apilevel-"><a href="../../../../../../reference/android/support/test/espresso/action/Tap.html">Tap</a></li>
597 <li class="api apilevel-"><a href="../../../../../../reference/android/support/test/espresso/action/Tapper.Status.html">Tapper.Status</a></li>
598 </ul>
599 </li>
600
601
602 </ul><br/>
603
604
605 </div><!-- end classes -->
606 </div><!-- end nav-panels -->
607 <div id="nav-tree" style="display:none" class="scroll-pane">
608 <div id="tree-list"></div>
609 </div><!-- end nav-tree -->
610 </div><!-- end swapper -->
611 <div id="nav-swap">
612 <a class="fullscreen">fullscreen</a>
613 <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>
614 </div>
615 </div> <!-- end devdoc-nav -->
616 </div> <!-- end side-nav -->
617 <script type="text/javascript">
618 // init fullscreen based on user pref
619 var fullscreen = readCookie("fullscreen");
620 if (fullscreen != 0) {
621 if (fullscreen == "false") {
622 toggleFullscreen(false);
623 } else {
624 toggleFullscreen(true);
625 }
626 }
627 // init nav version for mobile
628 if (isMobile) {
629 swapNav(); // tree view should be used on mobile
630 $('#nav-swap').hide();
631 } else {
632 chooseDefaultNav();
633 if ($("#nav-tree").is(':visible')) {
634 init_default_navtree("../../../../../../");
635 }
636 }
637 // scroll the selected page into view
638 $(document).ready(function() {
639 scrollIntoView("packages-nav");
640 scrollIntoView("classes-nav");
641 });
642 </script>
643
644
645
646
647
648<div class="col-12" id="doc-col">
649
650<div id="api-info-block">
651
652
653
654
655<div class="sum-details-links">
656
657</div><!-- end sum-details-links -->
658<div class="api-level">
659
660
661
662
663</div>
664</div><!-- end api-info-block -->
665
666
667<!-- ======== START OF CLASS DATA ======== -->
668
669<div id="jd-header">
670 public
671
672
673
674 interface
675<h1 itemprop="name">AdapterViewProtocol</h1>
676
677
678
679
680
681
682
683
684
685
686
687</div><!-- end header -->
688
689<div id="naMessage"></div>
690
691<div id="jd-content" class="api apilevel-">
692<table class="jd-inheritance-table">
693
694
695 <tr>
696
697 <td colspan="1" class="jd-inheritance-class-cell">android.support.test.espresso.action.AdapterViewProtocol</td>
698 </tr>
699
700
701</table>
702
703
704
705
706
707
708
709<div class="jd-descr">
710
711
712<h2>Class Overview</h2>
713<p itemprop="articleBody">A sadly necessary layer of indirection to interact with AdapterViews.
714 <p>
715 Generally any subclass should respect the contracts and behaviors of its superclass. Otherwise
716 it becomes impossible to work generically with objects that all claim to share a supertype - you
717 need special cases to perform the same operation 'owned' by the supertype for each sub-type. The
718 'is - a' relationship is broken.
719 </p>
720
721 <p>
722 Android breaks the Liskov substitution principal with ExpandableListView - you can't use
723 getAdapter(), getItemAtPosition(), and other methods common to AdapterViews on an
724 ExpandableListView because an ExpandableListView isn't an adapterView - they just share a lot of
725 code.
726 </p>
727
728 <p>
729 This interface exists to work around this wart (which sadly is copied in other projects too) and
730 lets the implementor translate Espresso's needs and manipulations of the AdapterView into calls
731 that make sense for the given subtype and context.
732 </p>
733
734 <p><i>
735 If you have to implement this to talk to widgets your own project defines - I'm sorry.
736 </i><p>
737
738</p>
739
740
741
742
743
744</div><!-- jd-descr -->
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761<div class="jd-descr">
762
763
764<h2>Summary</h2>
765
766
767
768<!-- ======== NESTED CLASS SUMMARY ======== -->
769<table id="nestedclasses" class="jd-sumtable"><tr><th colspan="12">Nested Classes</th></tr>
770
771
772
773 <tr class="alt-color api apilevel-" >
774 <td class="jd-typecol"><nobr>
775
776
777
778
779 class</nobr></td>
780 <td class="jd-linkcol"><a href="../../../../../../reference/android/support/test/espresso/action/AdapterViewProtocol.AdaptedData.html">AdapterViewProtocol.AdaptedData</a></td>
781 <td class="jd-descrcol" width="100%">
782 A holder that associates a data object from an AdapterView with a token the
783 AdapterViewProtocol can use to force that data object to be rendered as a child or deeper
784 descendant of the adapter view.&nbsp;
785
786
787
788 </td>
789 </tr>
790
791
792 <tr class=" api apilevel-" >
793 <td class="jd-typecol"><nobr>
794
795
796
797
798 interface</nobr></td>
799 <td class="jd-linkcol"><a href="../../../../../../reference/android/support/test/espresso/action/AdapterViewProtocol.DataFunction.html">AdapterViewProtocol.DataFunction</a></td>
800 <td class="jd-descrcol" width="100%">
801 A custom function that is applied when <code><a href="../../../../../../reference/android/support/test/espresso/action/AdapterViewProtocol.AdaptedData.html#getData()">getData()</a></code> is executed.&nbsp;
802
803
804
805 </td>
806 </tr>
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836<!-- ========== METHOD SUMMARY =========== -->
837<table id="pubmethods" class="jd-sumtable"><tr><th colspan="12">Public Methods</th></tr>
838
839
840
841
842 <tr class="alt-color api apilevel-" >
843 <td class="jd-typecol"><nobr>
844 abstract
845
846
847
848
849 Iterable&lt;<a href="../../../../../../reference/android/support/test/espresso/action/AdapterViewProtocol.AdaptedData.html">AdapterViewProtocol.AdaptedData</a>&gt;</nobr>
850 </td>
851 <td class="jd-linkcol" width="100%"><nobr>
852 <span class="sympad"><a href="../../../../../../reference/android/support/test/espresso/action/AdapterViewProtocol.html#getDataInAdapterView(android.widget.AdapterView<? extends android.widget.Adapter>)">getDataInAdapterView</a></span>(AdapterView&lt;?&nbsp;extends&nbsp;Adapter&gt; adapterView)</nobr>
853
854 <div class="jd-descrdiv">
855 Returns all data this AdapterViewProtocol can find within the given AdapterView.
856
857
858
859 </div>
860
861 </td></tr>
862
863
864
865 <tr class=" api apilevel-" >
866 <td class="jd-typecol"><nobr>
867 abstract
868
869
870
871
872 Optional&lt;<a href="../../../../../../reference/android/support/test/espresso/action/AdapterViewProtocol.AdaptedData.html">AdapterViewProtocol.AdaptedData</a>&gt;</nobr>
873 </td>
874 <td class="jd-linkcol" width="100%"><nobr>
875 <span class="sympad"><a href="../../../../../../reference/android/support/test/espresso/action/AdapterViewProtocol.html#getDataRenderedByView(android.widget.AdapterView<? extends android.widget.Adapter>, android.view.View)">getDataRenderedByView</a></span>(AdapterView&lt;?&nbsp;extends&nbsp;Adapter&gt; adapterView, View descendantView)</nobr>
876
877 <div class="jd-descrdiv">
878 Returns the data object this particular view is rendering if possible.
879
880
881
882 </div>
883
884 </td></tr>
885
886
887
888 <tr class="alt-color api apilevel-" >
889 <td class="jd-typecol"><nobr>
890 abstract
891
892
893
894
895 boolean</nobr>
896 </td>
897 <td class="jd-linkcol" width="100%"><nobr>
898 <span class="sympad"><a href="../../../../../../reference/android/support/test/espresso/action/AdapterViewProtocol.html#isDataRenderedWithinAdapterView(android.widget.AdapterView<? extends android.widget.Adapter>, android.support.test.espresso.action.AdapterViewProtocol.AdaptedData)">isDataRenderedWithinAdapterView</a></span>(AdapterView&lt;?&nbsp;extends&nbsp;Adapter&gt; adapterView, <a href="../../../../../../reference/android/support/test/espresso/action/AdapterViewProtocol.AdaptedData.html">AdapterViewProtocol.AdaptedData</a> adaptedData)</nobr>
899
900 <div class="jd-descrdiv">
901 Indicates whether or not there now exists a descendant view within adapterView that
902 is rendering this data.
903
904
905
906 </div>
907
908 </td></tr>
909
910
911
912 <tr class=" api apilevel-" >
913 <td class="jd-typecol"><nobr>
914 abstract
915
916
917
918
919 void</nobr>
920 </td>
921 <td class="jd-linkcol" width="100%"><nobr>
922 <span class="sympad"><a href="../../../../../../reference/android/support/test/espresso/action/AdapterViewProtocol.html#makeDataRenderedWithinAdapterView(android.widget.AdapterView<? extends android.widget.Adapter>, android.support.test.espresso.action.AdapterViewProtocol.AdaptedData)">makeDataRenderedWithinAdapterView</a></span>(AdapterView&lt;?&nbsp;extends&nbsp;Adapter&gt; adapterView, <a href="../../../../../../reference/android/support/test/espresso/action/AdapterViewProtocol.AdaptedData.html">AdapterViewProtocol.AdaptedData</a> data)</nobr>
923
924 <div class="jd-descrdiv">
925 Requests that a particular piece of data held in this AdapterView is actually rendered by it.
926
927
928
929 </div>
930
931 </td></tr>
932
933
934
935</table>
936
937
938
939
940
941
942
943</div><!-- jd-descr (summary) -->
944
945<!-- Details -->
946
947
948
949
950
951
952
953
954<!-- XML Attributes -->
955
956
957<!-- Enum Values -->
958
959
960<!-- Constants -->
961
962
963<!-- Fields -->
964
965
966<!-- Public ctors -->
967
968
969
970<!-- ========= CONSTRUCTOR DETAIL ======== -->
971<!-- Protected ctors -->
972
973
974
975<!-- ========= METHOD DETAIL ======== -->
976<!-- Public methdos -->
977
978<h2>Public Methods</h2>
979
980
981
982<A NAME="getDataInAdapterView(android.widget.AdapterView<? extends android.widget.Adapter>)"></A>
983
984<div class="jd-details api apilevel-">
985 <h4 class="jd-details-title">
986 <span class="normal">
987 public
988
989
990 abstract
991
992 Iterable&lt;<a href="../../../../../../reference/android/support/test/espresso/action/AdapterViewProtocol.AdaptedData.html">AdapterViewProtocol.AdaptedData</a>&gt;
993 </span>
994 <span class="sympad">getDataInAdapterView</span>
995 <span class="normal">(AdapterView&lt;?&nbsp;extends&nbsp;Adapter&gt; adapterView)</span>
996 </h4>
997 <div class="api-level">
998 <div></div>
999
1000
1001
1002 </div>
1003 <div class="jd-details-descr">
1004
1005
1006
1007
1008 <div class="jd-tagdata jd-tagdescr"><p>Returns all data this AdapterViewProtocol can find within the given AdapterView.
1009
1010 <p>
1011 Any AdaptedData returned by this method can be passed to makeDataRenderedWithinView and the
1012 implementation should make the AdapterView bring that data item onto the screen.
1013 </p></p></div>
1014 <div class="jd-tagdata">
1015 <h5 class="jd-tagtitle">Parameters</h5>
1016 <table class="jd-tagtable">
1017 <tr>
1018 <th>adapterView</td>
1019 <td>the AdapterView we want to interrogate the contents of.</td>
1020 </tr>
1021 </table>
1022 </div>
1023 <div class="jd-tagdata">
1024 <h5 class="jd-tagtitle">Returns</h5>
1025 <ul class="nolist"><li>an <code><a href="../../../../../../reference/java/lang/Iterable.html">Iterable</a></code> of AdaptedDatas representing all data the implementation sees in
1026 this view</li></ul>
1027 </div>
1028 <div class="jd-tagdata">
1029 <h5 class="jd-tagtitle">Throws</h5>
1030 <table class="jd-tagtable">
1031 <tr>
1032 <th>IllegalArgumentException</td>
1033 <td>if the implementation doesn't know how to manipulate the given
1034 adapter view.
1035</td>
1036 </tr>
1037 </table>
1038 </div>
1039
1040 </div>
1041</div>
1042
1043
1044<A NAME="getDataRenderedByView(android.widget.AdapterView<? extends android.widget.Adapter>, android.view.View)"></A>
1045
1046<div class="jd-details api apilevel-">
1047 <h4 class="jd-details-title">
1048 <span class="normal">
1049 public
1050
1051
1052 abstract
1053
1054 Optional&lt;<a href="../../../../../../reference/android/support/test/espresso/action/AdapterViewProtocol.AdaptedData.html">AdapterViewProtocol.AdaptedData</a>&gt;
1055 </span>
1056 <span class="sympad">getDataRenderedByView</span>
1057 <span class="normal">(AdapterView&lt;?&nbsp;extends&nbsp;Adapter&gt; adapterView, View descendantView)</span>
1058 </h4>
1059 <div class="api-level">
1060 <div></div>
1061
1062
1063
1064 </div>
1065 <div class="jd-details-descr">
1066
1067
1068
1069
1070 <div class="jd-tagdata jd-tagdescr"><p>Returns the data object this particular view is rendering if possible.
1071
1072 <p>
1073 Implementations are expected to create a relationship between the data in the AdapterView and
1074 the descendant views of the AdapterView that obeys the following conditions:
1075 </p>
1076
1077 <ul>
1078 <li>For each descendant view there exists either 0 or 1 data objects it is rendering.</li>
1079 <li>For each data object the AdapterView there exists either 0 or 1 descendant views which
1080 claim to be rendering it.</li>
1081 </ul>
1082
1083 <p> For example - if a PersonObject is rendered into: </p>
1084 <code>
1085 LinearLayout
1086 ImageView picture
1087 TextView firstName
1088 TextView lastName
1089 </code>
1090
1091 <p>
1092 It would be expected that getDataRenderedByView(adapter, LinearLayout) would return the
1093 PersonObject. If it were called instead with the TextView or ImageView it would return
1094 Object.absent().
1095 </p></p></div>
1096 <div class="jd-tagdata">
1097 <h5 class="jd-tagtitle">Parameters</h5>
1098 <table class="jd-tagtable">
1099 <tr>
1100 <th>adapterView</td>
1101 <td>the adapterview hosting the data.</td>
1102 </tr>
1103 <tr>
1104 <th>descendantView</td>
1105 <td>a view which is a child, grand-child, or deeper descendant of adapterView</td>
1106 </tr>
1107 </table>
1108 </div>
1109 <div class="jd-tagdata">
1110 <h5 class="jd-tagtitle">Returns</h5>
1111 <ul class="nolist"><li>an optional data object the descendant view is rendering.</li></ul>
1112 </div>
1113 <div class="jd-tagdata">
1114 <h5 class="jd-tagtitle">Throws</h5>
1115 <table class="jd-tagtable">
1116 <tr>
1117 <th>IllegalArgumentException</td>
1118 <td>if this protocol cannot interrogate this class of adapterView
1119</td>
1120 </tr>
1121 </table>
1122 </div>
1123
1124 </div>
1125</div>
1126
1127
1128<A NAME="isDataRenderedWithinAdapterView(android.widget.AdapterView<? extends android.widget.Adapter>, android.support.test.espresso.action.AdapterViewProtocol.AdaptedData)"></A>
1129
1130<div class="jd-details api apilevel-">
1131 <h4 class="jd-details-title">
1132 <span class="normal">
1133 public
1134
1135
1136 abstract
1137
1138 boolean
1139 </span>
1140 <span class="sympad">isDataRenderedWithinAdapterView</span>
1141 <span class="normal">(AdapterView&lt;?&nbsp;extends&nbsp;Adapter&gt; adapterView, <a href="../../../../../../reference/android/support/test/espresso/action/AdapterViewProtocol.AdaptedData.html">AdapterViewProtocol.AdaptedData</a> adaptedData)</span>
1142 </h4>
1143 <div class="api-level">
1144 <div></div>
1145
1146
1147
1148 </div>
1149 <div class="jd-details-descr">
1150
1151
1152
1153
1154 <div class="jd-tagdata jd-tagdescr"><p>Indicates whether or not there now exists a descendant view within adapterView that
1155 is rendering this data.</p></div>
1156 <div class="jd-tagdata">
1157 <h5 class="jd-tagtitle">Parameters</h5>
1158 <table class="jd-tagtable">
1159 <tr>
1160 <th>adapterView</td>
1161 <td>the AdapterView hosting this data.</td>
1162 </tr>
1163 <tr>
1164 <th>adaptedData</td>
1165 <td>the data we are checking the display state for.</td>
1166 </tr>
1167 </table>
1168 </div>
1169 <div class="jd-tagdata">
1170 <h5 class="jd-tagtitle">Returns</h5>
1171 <ul class="nolist"><li>true if the data is rendered by a view in the adapterView, false otherwise.
1172</li></ul>
1173 </div>
1174
1175 </div>
1176</div>
1177
1178
1179<A NAME="makeDataRenderedWithinAdapterView(android.widget.AdapterView<? extends android.widget.Adapter>, android.support.test.espresso.action.AdapterViewProtocol.AdaptedData)"></A>
1180
1181<div class="jd-details api apilevel-">
1182 <h4 class="jd-details-title">
1183 <span class="normal">
1184 public
1185
1186
1187 abstract
1188
1189 void
1190 </span>
1191 <span class="sympad">makeDataRenderedWithinAdapterView</span>
1192 <span class="normal">(AdapterView&lt;?&nbsp;extends&nbsp;Adapter&gt; adapterView, <a href="../../../../../../reference/android/support/test/espresso/action/AdapterViewProtocol.AdaptedData.html">AdapterViewProtocol.AdaptedData</a> data)</span>
1193 </h4>
1194 <div class="api-level">
1195 <div></div>
1196
1197
1198
1199 </div>
1200 <div class="jd-details-descr">
1201
1202
1203
1204
1205 <div class="jd-tagdata jd-tagdescr"><p>Requests that a particular piece of data held in this AdapterView is actually rendered by it.
1206
1207 <p>
1208 After calling this method it expected that there will exist some descendant view of adapterView
1209 for which calling getDataRenderedByView(adapterView, descView).get() == data.data is true.
1210 <p>
1211
1212 </p>
1213 Note: this need not happen immediately. EG: an implementor handling ListView may call
1214 listView.smoothScrollToPosition(data.opaqueToken) - which kicks off an animated scroll over
1215 the list to the given position. The animation may be in progress after this call returns. The
1216 only guarantee is that eventually - with no further interaction necessary - this data item
1217 will be rendered as a child or deeper descendant of this AdapterView.
1218 </p></p></div>
1219 <div class="jd-tagdata">
1220 <h5 class="jd-tagtitle">Parameters</h5>
1221 <table class="jd-tagtable">
1222 <tr>
1223 <th>adapterView</td>
1224 <td>the adapterView hosting the data.</td>
1225 </tr>
1226 <tr>
1227 <th>data</td>
1228 <td>an AdaptedData instance retrieved by a prior call to getDataInAdapterView</td>
1229 </tr>
1230 </table>
1231 </div>
1232 <div class="jd-tagdata">
1233 <h5 class="jd-tagtitle">Throws</h5>
1234 <table class="jd-tagtable">
1235 <tr>
1236 <th>IllegalArgumentException</td>
1237 <td>if this protocol cannot manipulate adapterView or if data is
1238 not owned by this AdapterViewProtocol.
1239</td>
1240 </tr>
1241 </table>
1242 </div>
1243
1244 </div>
1245</div>
1246
1247
1248
1249
1250
1251<!-- ========= METHOD DETAIL ======== -->
1252
1253
1254
1255<!-- ========= END OF CLASS DATA ========= -->
1256<A NAME="navbar_top"></A>
1257
1258<div id="footer" class="wrap" >
1259
1260
1261 <div id="copyright">
1262
1263 Except as noted, this content is licensed under <a
1264 href="http://www.apache.org/licenses/LICENSE-2.0">Apache 2.0</a>.
1265 For details and restrictions, see the <a href="../../../../../../license.html">
1266 Content License</a>.
1267 </div>
1268 <div id="build_info">
1269
1270 Android &nbsp;r &mdash;
1271<script src="../../../../../../timestamp.js" type="text/javascript"></script>
1272<script>document.write(BUILD_TIMESTAMP)</script>
1273
1274 </div>
1275
1276
1277 <div id="footerlinks">
1278
1279 <p>
1280 <a href="../../../../../../about/index.html">About Android</a>&nbsp;&nbsp;|&nbsp;
1281 <a href="../../../../../../legal.html">Legal</a>&nbsp;&nbsp;|&nbsp;
1282 <a href="../../../../../../support.html">Support</a>
1283 </p>
1284 </div>
1285
1286</div> <!-- end footer -->
1287</div> <!-- jd-content -->
1288
1289</div><!-- end doc-content -->
1290
1291</div> <!-- end body-content -->
1292
1293
1294
1295
1296
1297
1298</body>
1299</html>