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<html> 99<head> 100 101 102<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 103<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" /> 104<meta content="IE=edge" http-equiv="X-UA-Compatible"> 105 106<link rel="shortcut icon" type="image/x-icon" href="../../../../../favicon.ico" /> 107<title>GridPagerAdapter | 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"> 114 115<link href="../../../../../assets/css/default.css?v=7" rel="stylesheet" type="text/css"> 116 117 118<!-- FULLSCREEN STYLESHEET --> 119<link href="../../../../../assets/css/fullscreen.css" rel="stylesheet" class="fullscreen" 120type="text/css"> 121 122 123<!-- JAVASCRIPT --> 124<script src="http://www.google.com/jsapi" type="text/javascript"></script> 125<script src="../../../../../assets/js/android_3p-bundle.js" type="text/javascript"></script> 126<script type="text/javascript"> 127 var toRoot = "../../../../../"; 128 var metaTags = []; 129 var devsite = false; 130</script> 131<script src="../../../../../assets/js/docs.js?v=6" type="text/javascript"></script> 132 133 134 135<script> 136 (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ 137 (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), 138 m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) 139 })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); 140 141 ga('create', 'UA-5831155-1', 'android.com'); 142 ga('create', 'UA-49880327-2', 'android.com', {'name': 'universal'}); // New tracker); 143 ga('send', 'pageview'); 144 ga('universal.send', 'pageview'); // Send page view for new tracker. 145</script> 146 147</head> 148 149<body class="gc-documentation 150 develop reference" itemscope itemtype="http://schema.org/Article"> 151 <div id="doc-api-level" class="" style="display:none"></div> 152 <a name="top"></a> 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 class="dac-header" id="header"> 205 206 207 208 209 <div class="dac-header-inner"> 210 <a class="dac-nav-toggle" data-dac-toggle-nav href="javascript:;" title="Open navigation"> 211 <span class="dac-nav-hamburger"> 212 <span class="dac-nav-hamburger-top"></span> 213 <span class="dac-nav-hamburger-mid"></span> 214 <span class="dac-nav-hamburger-bot"></span> 215 </span> 216 </a> 217 <a class="dac-header-logo" href="../../../../../index.html"> 218 <img class="dac-header-logo-image" src="../../../../../assets/images/android_logo.png" 219 srcset="../../../../../assets/images/android_logo@2x.png 2x" 220 width="32" height="36" alt="Android" /> Developers 221 </a> 222 223 <ul class="dac-header-crumbs"> 224 225 <li class="dac-header-crumbs-item"><span class="dac-header-crumbs-link current ">GridPagerAdapter</a></li> 226 </ul> 227 228 229 230 231 <div class="dac-header-search" id="search-container"> 232 <div class="dac-header-search-inner"> 233 <div class="dac-sprite dac-search dac-header-search-btn" id="search-btn"></div> 234 <form class="dac-header-search-form" onsubmit="return submit_search()"> 235 <input id="search_autocomplete" type="text" value="" autocomplete="off" name="q" 236 onfocus="search_focus_changed(this, true)" onblur="search_focus_changed(this, false)" 237 onkeydown="return search_changed(event, true, '../../../../../')" 238 onkeyup="return search_changed(event, false, '../../../../../')" 239 class="dac-header-search-input" placeholder="Search" /> 240 <a class="dac-header-search-close hide" id="search-close">close</a> 241 </form> 242 </div><!-- end dac-header-search-inner --> 243 </div><!-- end dac-header-search --> 244 245 <div class="search_filtered_wrapper"> 246 <div class="suggest-card reference no-display"> 247 <ul class="search_filtered"> 248 </ul> 249 </div> 250 <div class="suggest-card develop no-display"> 251 <ul class="search_filtered"> 252 </ul> 253 <div class="child-card guides no-display"> 254 </div> 255 <div class="child-card training no-display"> 256 </div> 257 <div class="child-card samples no-display"> 258 </div> 259 </div> 260 <div class="suggest-card design no-display"> 261 <ul class="search_filtered"> 262 </ul> 263 </div> 264 <div class="suggest-card distribute no-display"> 265 <ul class="search_filtered"> 266 </ul> 267 </div> 268 </div> 269 270 271 272 <a class="dac-header-console-btn" href="https://play.google.com/apps/publish/"> 273 <span class="dac-sprite dac-google-play"></span> 274 <span class="dac-visible-desktop-inline">Developer</span> 275 Console 276 </a> 277 278 </div><!-- end header-wrap.wrap --> 279 </div><!-- end header --> 280 281 <div id="searchResults" class="wrap" style="display:none;"> 282 <h2 id="searchTitle">Results</h2> 283 <div id="leftSearchControl" class="search-control">Loading...</div> 284 </div> 285 </div> <!--end header-wrapper --> 286 287 288 <!-- Navigation--> 289 <nav class="dac-nav"> 290 <div class="dac-nav-dimmer" data-dac-toggle-nav></div> 291 292 <ul class="dac-nav-list" data-dac-nav> 293 <li class="dac-nav-item dac-nav-head"> 294 <a class="dac-nav-link dac-nav-logo" data-dac-toggle-nav href="javascript:;" title="Close navigation"> 295 <img class="dac-logo-image" src="../../../../../assets/images/android_logo.png" 296 srcset="../../../../../assets/images/android_logo@2x.png 2x" 297 width="32" height="36" alt="Android" /> Developers 298 </a> 299 </li> 300 <li class="dac-nav-item home"> 301 <a class="dac-nav-link dac-visible-mobile-block" href="../../../../../index.html">Home</a> 302 <ul class="dac-nav-secondary about"> 303 <li class="dac-nav-item about"> 304 <a class="dac-nav-link" href="../../../../../about/index.html">Android</a> 305 </li> 306 <li class="dac-nav-item wear"> 307 <a class="dac-nav-link" href="../../../../../wear/index.html">Wear</a> 308 </li> 309 <li class="dac-nav-item tv"> 310 <a class="dac-nav-link" href="../../../../../tv/index.html">TV</a> 311 </li> 312 <li class="dac-nav-item auto"> 313 <a class="dac-nav-link" href="../../../../../auto/index.html">Auto</a> 314 </li> 315 </ul> 316 </li> 317 <li class="dac-nav-item design"> 318 <a class="dac-nav-link" href="../../../../../design/index.html" 319 zh-tw-lang="設計" 320 zh-cn-lang="设计" 321 ru-lang="Проектирование" 322 ko-lang="디자인" 323 ja-lang="設計" 324 es-lang="Diseñar">Design</a> 325 </li> 326 <li class="dac-nav-item develop"> 327 <a class="dac-nav-link" href="../../../../../develop/index.html" 328 zh-tw-lang="開發" 329 zh-cn-lang="开发" 330 ru-lang="Разработка" 331 ko-lang="개발" 332 ja-lang="開発" 333 es-lang="Desarrollar">Develop</a> 334 <ul class="dac-nav-secondary develop"> 335 <li class="dac-nav-item training"> 336 <a class="dac-nav-link" href="../../../../../training/index.html" 337 zh-tw-lang="訓練課程" 338 zh-cn-lang="培训" 339 ru-lang="Курсы" 340 ko-lang="교육" 341 ja-lang="トレーニング" 342 es-lang="Capacitación">Training</a> 343 </li> 344 <li class="dac-nav-item guide"> 345 <a class="dac-nav-link" href="../../../../../guide/index.html" 346 zh-tw-lang="API 指南" 347 zh-cn-lang="API 指南" 348 ru-lang="Руководства по API" 349 ko-lang="API 가이드" 350 ja-lang="API ガイド" 351 es-lang="Guías de la API">API Guides</a> 352 </li> 353 <li class="dac-nav-item reference"> 354 <a class="dac-nav-link" href="../../../../../reference/packages.html" 355 zh-tw-lang="參考資源" 356 zh-cn-lang="参考" 357 ru-lang="Справочник" 358 ko-lang="참조문서" 359 ja-lang="リファレンス" 360 es-lang="Referencia">Reference</a> 361 </li> 362 <li class="dac-nav-item tools"> 363 <a class="dac-nav-link" href="../../../../../sdk/index.html" 364 zh-tw-lang="相關工具" 365 zh-cn-lang="工具" 366 ru-lang="Инструменты" 367 ko-lang="도구" 368 ja-lang="ツール" 369 es-lang="Herramientas">Tools</a></li> 370 <li class="dac-nav-item google"> 371 <a class="dac-nav-link" href="../../../../../google/index.html">Google Services</a> 372 </li> 373 374 <li class="dac-nav-item preview"> 375 <a class="dac-nav-link" href="../../../../../preview/index.html">Preview</a> 376 </li> 377 </ul> 378 </li> 379 <li class="dac-nav-item distribute"> 380 <a class="dac-nav-link" href="../../../../../distribute/googleplay/index.html" 381 zh-tw-lang="發佈" 382 zh-cn-lang="分发" 383 ru-lang="Распространение" 384 ko-lang="배포" 385 ja-lang="配布" 386 es-lang="Distribuir">Distribute</a> 387 <ul class="dac-nav-secondary distribute"> 388 <li class="dac-nav-item googleplay"> 389 <a class="dac-nav-link" href="../../../../../distribute/googleplay/index.html">Google Play</a></li> 390 <li class="dac-nav-item essentials"> 391 <a class="dac-nav-link" href="../../../../../distribute/essentials/index.html">Essentials</a></li> 392 <li class="dac-nav-item users"> 393 <a class="dac-nav-link" href="../../../../../distribute/users/index.html">Get Users</a></li> 394 <li class="dac-nav-item engage"> 395 <a class="dac-nav-link" href="../../../../../distribute/engage/index.html">Engage & Retain</a></li> 396 <li class="dac-nav-item monetize"> 397 <a class="dac-nav-link" href="../../../../../distribute/monetize/index.html">Earn</a> 398 </li> 399 <li class="dac-nav-item analyze"> 400 <a class="dac-nav-link" href="../../../../../distribute/analyze/index.html">Analyze</a> 401 </li> 402 <li class="dac-nav-item stories"> 403 <a class="dac-nav-link" href="../../../../../distribute/stories/index.html">Stories</a> 404 </li> 405 </ul> 406 </li> 407 </ul> 408 </nav> 409 <!-- end navigation--> 410 411 412 413 414 415 416 <div class="wrap clearfix" id="body-content"><div class="cols"> 417 <div class="col-4 dac-hidden-mobile" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement"> 418 <div id="devdoc-nav"> 419 <div id="api-nav-header"> 420 <div id="api-level-toggle"> 421 <label for="apiLevelCheckbox" class="disabled" 422 title="Select your target API level to dim unavailable APIs">API level: </label> 423 <div class="select-wrapper"> 424 <select id="apiLevelSelector"> 425 <!-- option elements added by buildApiLevelSelector() --> 426 </select> 427 </div> 428 </div><!-- end toggle --> 429 <div id="api-nav-title">Android APIs</div> 430 </div><!-- end nav header --> 431 <script> 432 var SINCE_DATA = [ ]; 433 buildApiLevelSelector(); 434 </script> 435 436 <div id="swapper"> 437 <div id="nav-panels"> 438 <div id="resize-packages-nav"> 439 <div id="packages-nav" class="scroll-pane"> 440 441 <ul> 442 443 <li class="api apilevel-"> 444 <a href="../../../../../reference/android/support/wearable/package-summary.html">android.support.wearable</a></li> 445 <li class="api apilevel-"> 446 <a href="../../../../../reference/android/support/wearable/activity/package-summary.html">android.support.wearable.activity</a></li> 447 <li class="api apilevel-"> 448 <a href="../../../../../reference/android/support/wearable/companion/package-summary.html">android.support.wearable.companion</a></li> 449 <li class="api apilevel-"> 450 <a href="../../../../../reference/android/support/wearable/input/package-summary.html">android.support.wearable.input</a></li> 451 <li class="api apilevel-"> 452 <a href="../../../../../reference/android/support/wearable/media/package-summary.html">android.support.wearable.media</a></li> 453 <li class="api apilevel-"> 454 <a href="../../../../../reference/android/support/wearable/provider/package-summary.html">android.support.wearable.provider</a></li> 455 <li class="selected api apilevel-"> 456 <a href="../../../../../reference/android/support/wearable/view/package-summary.html">android.support.wearable.view</a></li> 457 <li class="api apilevel-"> 458 <a href="../../../../../reference/android/support/wearable/watchface/package-summary.html">android.support.wearable.watchface</a></li> 459 </ul><br/> 460 461 </div> <!-- end packages-nav --> 462 </div> <!-- end resize-packages --> 463 <div id="classes-nav" class="scroll-pane"> 464 465 466 467 <ul> 468 469 470 <li><h2>Interfaces</h2> 471 <ul> 472 <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/DelayedConfirmationView.DelayedConfirmationListener.html">DelayedConfirmationView.DelayedConfirmationListener</a></li> 473 <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridPageOptions.html">GridPageOptions</a></li> 474 <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridPageOptions.BackgroundListener.html">GridPageOptions.BackgroundListener</a></li> 475 <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.OnAdapterChangeListener.html">GridViewPager.OnAdapterChangeListener</a></li> 476 <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.OnPageChangeListener.html">GridViewPager.OnPageChangeListener</a></li> 477 <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WatchViewStub.OnLayoutInflatedListener.html">WatchViewStub.OnLayoutInflatedListener</a></li> 478 <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WearableListView.ClickListener.html">WearableListView.ClickListener</a></li> 479 <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WearableListView.OnCenterProximityListener.html">WearableListView.OnCenterProximityListener</a></li> 480 <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WearableListView.OnCentralPositionChangedListener.html">WearableListView.OnCentralPositionChangedListener</a></li> 481 <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WearableListView.OnScrollListener.html">WearableListView.OnScrollListener</a></li> 482 </ul> 483 </li> 484 485 <li><h2>Classes</h2> 486 <ul> 487 <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/ActionLabel.html">ActionLabel</a></li> 488 <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/ActionPage.html">ActionPage</a></li> 489 <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/BoxInsetLayout.html">BoxInsetLayout</a></li> 490 <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/BoxInsetLayout.LayoutParams.html">BoxInsetLayout.LayoutParams</a></li> 491 <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/CardFragment.html">CardFragment</a></li> 492 <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/CardFrame.html">CardFrame</a></li> 493 <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/CardScrollView.html">CardScrollView</a></li> 494 <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/CircledImageView.html">CircledImageView</a></li> 495 <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/CircularButton.html">CircularButton</a></li> 496 <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/CrossfadeDrawable.html">CrossfadeDrawable</a></li> 497 <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/DelayedConfirmationView.html">DelayedConfirmationView</a></li> 498 <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/DismissOverlayView.html">DismissOverlayView</a></li> 499 <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/DotsPageIndicator.html">DotsPageIndicator</a></li> 500 <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/FragmentGridPagerAdapter.html">FragmentGridPagerAdapter</a></li> 501 <li class="selected api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html">GridPagerAdapter</a></li> 502 <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.html">GridViewPager</a></li> 503 <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.LayoutParams.html">GridViewPager.LayoutParams</a></li> 504 <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/ProgressSpinner.html">ProgressSpinner</a></li> 505 <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/SimpleAnimatorListener.html">SimpleAnimatorListener</a></li> 506 <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WatchViewStub.html">WatchViewStub</a></li> 507 <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WearableFrameLayout.html">WearableFrameLayout</a></li> 508 <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WearableFrameLayout.LayoutParams.html">WearableFrameLayout.LayoutParams</a></li> 509 <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WearableListView.html">WearableListView</a></li> 510 <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WearableListView.Adapter.html">WearableListView.Adapter</a></li> 511 <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WearableListView.ViewHolder.html">WearableListView.ViewHolder</a></li> 512 </ul> 513 </li> 514 515 516 517 </ul><br/> 518 519 520 </div><!-- end classes --> 521 </div><!-- end nav-panels --> 522 <div id="nav-tree" style="display:none" class="scroll-pane"> 523 <div id="tree-list"></div> 524 </div><!-- end nav-tree --> 525 </div><!-- end swapper --> 526 <div id="nav-swap"> 527 <a class="fullscreen">fullscreen</a> 528 <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> 529 </div> 530 </div> <!-- end devdoc-nav --> 531 </div> <!-- end side-nav --> 532 <script type="text/javascript"> 533 // init fullscreen based on user pref 534 var fullscreen = readCookie("fullscreen"); 535 if (fullscreen != 0) { 536 if (fullscreen == "false") { 537 toggleFullscreen(false); 538 } else { 539 toggleFullscreen(true); 540 } 541 } 542 // init nav version for mobile 543 if (isMobile) { 544 swapNav(); // tree view should be used on mobile 545 $('#nav-swap').hide(); 546 } else { 547 chooseDefaultNav(); 548 if ($("#nav-tree").is(':visible')) { 549 init_default_navtree("../../../../../"); 550 } 551 } 552 // scroll the selected page into view 553 $(document).ready(function() { 554 scrollIntoView("packages-nav"); 555 scrollIntoView("classes-nav"); 556 }); 557 </script> 558 559 560 561 562 563<div class="col-12" id="doc-col"> 564 565<div id="api-info-block"> 566 567 568 569 570 571 572 573 574 575 576 577<div class="sum-details-links"> 578 579Summary: 580 581 582 583 584 585 <a href="#constants">Constants</a> 586 587 588 589 590 | <a href="#lfields">Fields</a> 591 592 593 594 595 | <a href="#pubctors">Ctors</a> 596 597 598 599 600 | <a href="#pubmethods">Methods</a> 601 602 603 604 | <a href="#promethods">Protected Methods</a> 605 606 607 608 | <a href="#inhmethods">Inherited Methods</a> 609 610| <a href="#" onclick="return toggleAllClassInherited()" id="toggleAllClassInherited">[Expand All]</a> 611 612</div><!-- end sum-details-links --> 613<div class="api-level"> 614 615 616 617 618</div> 619</div><!-- end api-info-block --> 620 621 622<!-- ======== START OF CLASS DATA ======== --> 623 624<div id="jd-header"> 625 public 626 627 628 abstract 629 class 630<h1 itemprop="name">GridPagerAdapter</h1> 631 632 633 634 635 extends Object<br/> 636 637 638 639 640 641 642 643 644 645 646 647 648</div><!-- end header --> 649 650<div id="naMessage"></div> 651 652<div id="jd-content" class="api apilevel-"> 653<table class="jd-inheritance-table"> 654 655 656 <tr> 657 658 <td colspan="2" class="jd-inheritance-class-cell">java.lang.Object</td> 659 </tr> 660 661 662 <tr> 663 664 <td class="jd-inheritance-space"> ↳</td> 665 666 <td colspan="1" class="jd-inheritance-class-cell">android.support.wearable.view.GridPagerAdapter</td> 667 </tr> 668 669 670</table> 671 672 673 674 675<table class="jd-sumtable jd-sumtable-subclasses"><tr><td colspan="12" style="border:none;margin:0;padding:0;"> 676 677 <a href="#" onclick="return toggleInherited(this, null)" id="subclasses-direct" class="jd-expando-trigger closed" 678 ><img id="subclasses-direct-trigger" 679 src="../../../../../assets/images/triangle-closed.png" 680 class="jd-expando-trigger-img" /></a>Known Direct Subclasses 681 682 <div id="subclasses-direct"> 683 <div id="subclasses-direct-list" 684 class="jd-inheritedlinks" 685 686 > 687 688 689 <a href="../../../../../reference/android/support/wearable/view/FragmentGridPagerAdapter.html">FragmentGridPagerAdapter</a> 690 691 692 </div> 693 <div id="subclasses-direct-summary" 694 style="display: none;" 695 > 696 697 <table class="jd-sumtable-expando"> 698 699 <tr class="alt-color api apilevel-" > 700 <td class="jd-linkcol"><a href="../../../../../reference/android/support/wearable/view/FragmentGridPagerAdapter.html">FragmentGridPagerAdapter</a></td> 701 <td class="jd-descrcol" width="100%"> 702 An implementation of GridPagerAdapter which represents each page as a <code><a href="../../../../../reference/android/app/Fragment.html">Fragment</a></code>. 703 704 705 706 </td> 707 </tr> 708 709 710 </table> 711 712 </div> 713 </div> 714</td></tr></table> 715 716 717 718 719<div class="jd-descr"> 720 721 722<h2>Class Overview</h2> 723<p itemprop="articleBody">This component is responsible for providing views requested by a <code><a href="../../../../../reference/android/support/wearable/view/GridViewPager.html">GridViewPager</a></code>. 724 <p> 725 Content is organized into rows and columns of pages, where each page is represented by a View. 726 Each row may contain a different number of columns. 727 <p> 728 In addition to content views, this adapter is also queried for backgrounds to be displayed for 729 each page. When the same background spans multiple pages, it's automatically zoomed and panned to 730 create a parallax effect against the movement of the page content as it moves. By default, no 731 background is provided. 732</p> 733 734 735 736 737 738</div><!-- jd-descr --> 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755<div class="jd-descr"> 756 757 758<h2>Summary</h2> 759 760 761 762 763 764 765 766 767 768 769 770 771 772<!-- =========== ENUM CONSTANT SUMMARY =========== --> 773<table id="constants" class="jd-sumtable"><tr><th colspan="12">Constants</th></tr> 774 775 776 777 <tr class="alt-color api apilevel-" > 778 <td class="jd-typecol">int</td> 779 <td class="jd-linkcol"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#OPTION_DISABLE_PARALLAX">OPTION_DISABLE_PARALLAX</a></td> 780 <td class="jd-descrcol" width="100%"> 781 Disables zooming and parallax scrolling of the background. 782 783 784 785 </td> 786 </tr> 787 788 789 <tr class=" api apilevel-" > 790 <td class="jd-typecol">int</td> 791 <td class="jd-linkcol"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#PAGE_DEFAULT_OPTIONS">PAGE_DEFAULT_OPTIONS</a></td> 792 <td class="jd-descrcol" width="100%"> 793 Default background options. 794 795 796 797 </td> 798 </tr> 799 800 801 802</table> 803 804 805 806 807 808 809 810<!-- =========== FIELD SUMMARY =========== --> 811<table id="lfields" class="jd-sumtable"><tr><th colspan="12">Fields</th></tr> 812 813 814 815 <tr class="alt-color api apilevel-" > 816 <td class="jd-typecol"><nobr> 817 public 818 static 819 final 820 Drawable</nobr></td> 821 <td class="jd-linkcol"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#BACKGROUND_NONE">BACKGROUND_NONE</a></td> 822 <td class="jd-descrcol" width="100%"> 823 This value indicates that no background should drawn. 824 825 826 827 </td> 828 </tr> 829 830 831 <tr class=" api apilevel-" > 832 <td class="jd-typecol"><nobr> 833 public 834 static 835 final 836 Point</nobr></td> 837 <td class="jd-linkcol"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#POSITION_NONE">POSITION_NONE</a></td> 838 <td class="jd-descrcol" width="100%"> 839 840 841 842 843 </td> 844 </tr> 845 846 847 <tr class="alt-color api apilevel-" > 848 <td class="jd-typecol"><nobr> 849 public 850 static 851 final 852 Point</nobr></td> 853 <td class="jd-linkcol"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#POSITION_UNCHANGED">POSITION_UNCHANGED</a></td> 854 <td class="jd-descrcol" width="100%"> 855 856 857 858 859 </td> 860 </tr> 861 862 863 864</table> 865 866 867 868 869 870 871 872<!-- ======== CONSTRUCTOR SUMMARY ======== --> 873<table id="pubctors" class="jd-sumtable"><tr><th colspan="12">Public Constructors</th></tr> 874 875 876 877 878 <tr class="alt-color api apilevel-" > 879 <td class="jd-typecol"><nobr> 880 881 882 883 884 885 </nobr> 886 </td> 887 <td class="jd-linkcol" width="100%"><nobr> 888 <span class="sympad"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#GridPagerAdapter()">GridPagerAdapter</a></span>()</nobr> 889 890 </td></tr> 891 892 893 894</table> 895 896 897 898 899 900 901<!-- ========== METHOD SUMMARY =========== --> 902<table id="pubmethods" class="jd-sumtable"><tr><th colspan="12">Public Methods</th></tr> 903 904 905 906 907 <tr class="alt-color api apilevel-" > 908 <td class="jd-typecol"><nobr> 909 abstract 910 911 912 913 914 void</nobr> 915 </td> 916 <td class="jd-linkcol" width="100%"><nobr> 917 <span class="sympad"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#destroyItem(android.view.ViewGroup, int, int, java.lang.Object)">destroyItem</a></span>(ViewGroup container, int row, int column, Object object)</nobr> 918 919 <div class="jd-descrdiv"> 920 Removes a page for the given position. 921 922 923 924 </div> 925 926 </td></tr> 927 928 929 930 <tr class=" api apilevel-" > 931 <td class="jd-typecol"><nobr> 932 933 934 935 936 937 void</nobr> 938 </td> 939 <td class="jd-linkcol" width="100%"><nobr> 940 <span class="sympad"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#finishUpdate(android.view.ViewGroup)">finishUpdate</a></span>(ViewGroup container)</nobr> 941 942 <div class="jd-descrdiv"> 943 Called when the a change in the shown pages has been completed. 944 945 946 947 </div> 948 949 </td></tr> 950 951 952 953 <tr class="alt-color api apilevel-" > 954 <td class="jd-typecol"><nobr> 955 956 957 958 959 960 Drawable</nobr> 961 </td> 962 <td class="jd-linkcol" width="100%"><nobr> 963 <span class="sympad"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#getBackgroundForPage(int, int)">getBackgroundForPage</a></span>(int row, int column)</nobr> 964 965 <div class="jd-descrdiv"> 966 Provides content to be displayed as background for a specific page. 967 968 969 970 </div> 971 972 </td></tr> 973 974 975 976 <tr class=" api apilevel-" > 977 <td class="jd-typecol"><nobr> 978 979 980 981 982 983 Drawable</nobr> 984 </td> 985 <td class="jd-linkcol" width="100%"><nobr> 986 <span class="sympad"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#getBackgroundForRow(int)">getBackgroundForRow</a></span>(int row)</nobr> 987 988 <div class="jd-descrdiv"> 989 Provides content to be displayed as the default background for all pages on the given row. 990 991 992 993 </div> 994 995 </td></tr> 996 997 998 999 <tr class="alt-color api apilevel-" > 1000 <td class="jd-typecol"><nobr> 1001 abstract 1002 1003 1004 1005 1006 int</nobr> 1007 </td> 1008 <td class="jd-linkcol" width="100%"><nobr> 1009 <span class="sympad"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#getColumnCount(int)">getColumnCount</a></span>(int row)</nobr> 1010 1011 <div class="jd-descrdiv"> 1012 Returns the maximum number of columns for each row. 1013 1014 1015 1016 </div> 1017 1018 </td></tr> 1019 1020 1021 1022 <tr class=" api apilevel-" > 1023 <td class="jd-typecol"><nobr> 1024 1025 1026 1027 1028 1029 int</nobr> 1030 </td> 1031 <td class="jd-linkcol" width="100%"><nobr> 1032 <span class="sympad"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#getCurrentColumnForRow(int, int)">getCurrentColumnForRow</a></span>(int row, int currentColumn)</nobr> 1033 1034 <div class="jd-descrdiv"> 1035 Returns the column to arrive at when navigating vertically to the specified row. 1036 1037 1038 1039 </div> 1040 1041 </td></tr> 1042 1043 1044 1045 <tr class="alt-color api apilevel-" > 1046 <td class="jd-typecol"><nobr> 1047 1048 1049 1050 1051 1052 Point</nobr> 1053 </td> 1054 <td class="jd-linkcol" width="100%"><nobr> 1055 <span class="sympad"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#getItemPosition(java.lang.Object)">getItemPosition</a></span>(Object object)</nobr> 1056 1057 <div class="jd-descrdiv"> 1058 Called when the host view is attempting to determine if an item's position has changed. 1059 1060 1061 1062 </div> 1063 1064 </td></tr> 1065 1066 1067 1068 <tr class=" api apilevel-" > 1069 <td class="jd-typecol"><nobr> 1070 1071 1072 1073 1074 1075 int</nobr> 1076 </td> 1077 <td class="jd-linkcol" width="100%"><nobr> 1078 <span class="sympad"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#getOptionsForPage(int, int)">getOptionsForPage</a></span>(int row, int column)</nobr> 1079 1080 <div class="jd-descrdiv"> 1081 Provides a set of features to apply to a page background. 1082 1083 1084 1085 </div> 1086 1087 </td></tr> 1088 1089 1090 1091 <tr class="alt-color api apilevel-" > 1092 <td class="jd-typecol"><nobr> 1093 abstract 1094 1095 1096 1097 1098 int</nobr> 1099 </td> 1100 <td class="jd-linkcol" width="100%"><nobr> 1101 <span class="sympad"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#getRowCount()">getRowCount</a></span>()</nobr> 1102 1103 <div class="jd-descrdiv"> 1104 Returns the number of rows available. 1105 1106 1107 1108 </div> 1109 1110 </td></tr> 1111 1112 1113 1114 <tr class=" api apilevel-" > 1115 <td class="jd-typecol"><nobr> 1116 abstract 1117 1118 1119 1120 1121 Object</nobr> 1122 </td> 1123 <td class="jd-linkcol" width="100%"><nobr> 1124 <span class="sympad"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#instantiateItem(android.view.ViewGroup, int, int)">instantiateItem</a></span>(ViewGroup container, int row, int column)</nobr> 1125 1126 <div class="jd-descrdiv"> 1127 Creates the page for the given position. 1128 1129 1130 1131 </div> 1132 1133 </td></tr> 1134 1135 1136 1137 <tr class="alt-color api apilevel-" > 1138 <td class="jd-typecol"><nobr> 1139 abstract 1140 1141 1142 1143 1144 boolean</nobr> 1145 </td> 1146 <td class="jd-linkcol" width="100%"><nobr> 1147 <span class="sympad"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#isViewFromObject(android.view.View, java.lang.Object)">isViewFromObject</a></span>(View view, Object object)</nobr> 1148 1149 <div class="jd-descrdiv"> 1150 Determines whether a page View is associated with a specific key object as returned by 1151 <code><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#instantiateItem(android.view.ViewGroup, int, int)">instantiateItem(ViewGroup, int, int)</a></code>. 1152 1153 1154 1155 </div> 1156 1157 </td></tr> 1158 1159 1160 1161 <tr class=" api apilevel-" > 1162 <td class="jd-typecol"><nobr> 1163 1164 1165 1166 1167 1168 void</nobr> 1169 </td> 1170 <td class="jd-linkcol" width="100%"><nobr> 1171 <span class="sympad"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#notifyDataSetChanged()">notifyDataSetChanged</a></span>()</nobr> 1172 1173 <div class="jd-descrdiv"> 1174 This method should be called by the application if the data backing this adapter has changed 1175 and associated views should update. 1176 1177 1178 1179 </div> 1180 1181 </td></tr> 1182 1183 1184 1185 <tr class="alt-color api apilevel-" > 1186 <td class="jd-typecol"><nobr> 1187 1188 1189 1190 1191 1192 void</nobr> 1193 </td> 1194 <td class="jd-linkcol" width="100%"><nobr> 1195 <span class="sympad"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#notifyPageBackgroundChanged(int, int)">notifyPageBackgroundChanged</a></span>(int row, int column)</nobr> 1196 1197 <div class="jd-descrdiv"> 1198 This method should be called if the value returned by <code><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#getBackgroundForPage(int, int)">getBackgroundForPage(int, int)</a></code> 1199 or options returned by <code><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#getOptionsForPage(int, int)">getOptionsForPage(int, int)</a></code> change. 1200 1201 1202 1203 </div> 1204 1205 </td></tr> 1206 1207 1208 1209 <tr class=" api apilevel-" > 1210 <td class="jd-typecol"><nobr> 1211 1212 1213 1214 1215 1216 void</nobr> 1217 </td> 1218 <td class="jd-linkcol" width="100%"><nobr> 1219 <span class="sympad"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#notifyRowBackgroundChanged(int)">notifyRowBackgroundChanged</a></span>(int row)</nobr> 1220 1221 <div class="jd-descrdiv"> 1222 This method should be called if the value returned by <code><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#getBackgroundForRow(int)">getBackgroundForRow(int)</a></code> 1223 changes. 1224 1225 1226 1227 </div> 1228 1229 </td></tr> 1230 1231 1232 1233 <tr class="alt-color api apilevel-" > 1234 <td class="jd-typecol"><nobr> 1235 1236 1237 1238 1239 1240 void</nobr> 1241 </td> 1242 <td class="jd-linkcol" width="100%"><nobr> 1243 <span class="sympad"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#registerDataSetObserver(android.database.DataSetObserver)">registerDataSetObserver</a></span>(DataSetObserver observer)</nobr> 1244 1245 <div class="jd-descrdiv"> 1246 Register an observer to receive callbacks related to the adapter's data changing. 1247 1248 1249 1250 </div> 1251 1252 </td></tr> 1253 1254 1255 1256 <tr class=" api apilevel-" > 1257 <td class="jd-typecol"><nobr> 1258 1259 1260 1261 1262 1263 void</nobr> 1264 </td> 1265 <td class="jd-linkcol" width="100%"><nobr> 1266 <span class="sympad"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#restoreState(android.os.Parcelable, java.lang.ClassLoader)">restoreState</a></span>(Parcelable savedState, ClassLoader classLoader)</nobr> 1267 1268 <div class="jd-descrdiv"> 1269 Restores the previously saved state of this adapter. 1270 1271 1272 1273 </div> 1274 1275 </td></tr> 1276 1277 1278 1279 <tr class="alt-color api apilevel-" > 1280 <td class="jd-typecol"><nobr> 1281 1282 1283 1284 1285 1286 Parcelable</nobr> 1287 </td> 1288 <td class="jd-linkcol" width="100%"><nobr> 1289 <span class="sympad"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#saveState()">saveState</a></span>()</nobr> 1290 1291 <div class="jd-descrdiv"> 1292 Saves the current state of this adapter. 1293 1294 1295 1296 </div> 1297 1298 </td></tr> 1299 1300 1301 1302 <tr class=" api apilevel-" > 1303 <td class="jd-typecol"><nobr> 1304 1305 1306 1307 1308 1309 void</nobr> 1310 </td> 1311 <td class="jd-linkcol" width="100%"><nobr> 1312 <span class="sympad"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#setCurrentColumnForRow(int, int)">setCurrentColumnForRow</a></span>(int row, int currentColumn)</nobr> 1313 1314 <div class="jd-descrdiv"> 1315 Called to inform the adapter of which column is now current for the given row. 1316 1317 1318 1319 </div> 1320 1321 </td></tr> 1322 1323 1324 1325 <tr class="alt-color api apilevel-" > 1326 <td class="jd-typecol"><nobr> 1327 1328 1329 1330 1331 1332 void</nobr> 1333 </td> 1334 <td class="jd-linkcol" width="100%"><nobr> 1335 <span class="sympad"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#startUpdate(android.view.ViewGroup)">startUpdate</a></span>(ViewGroup container)</nobr> 1336 1337 <div class="jd-descrdiv"> 1338 Called when a change in the shown pages is going to start being made. 1339 1340 1341 1342 </div> 1343 1344 </td></tr> 1345 1346 1347 1348 <tr class=" api apilevel-" > 1349 <td class="jd-typecol"><nobr> 1350 1351 1352 1353 1354 1355 void</nobr> 1356 </td> 1357 <td class="jd-linkcol" width="100%"><nobr> 1358 <span class="sympad"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#unregisterDataSetObserver(android.database.DataSetObserver)">unregisterDataSetObserver</a></span>(DataSetObserver observer)</nobr> 1359 1360 <div class="jd-descrdiv"> 1361 Unregister an observer from callbacks related to the adapter's data changing. 1362 1363 1364 1365 </div> 1366 1367 </td></tr> 1368 1369 1370 1371</table> 1372 1373 1374 1375 1376<!-- ========== METHOD SUMMARY =========== --> 1377<table id="promethods" class="jd-sumtable"><tr><th colspan="12">Protected Methods</th></tr> 1378 1379 1380 1381 1382 <tr class="alt-color api apilevel-" > 1383 <td class="jd-typecol"><nobr> 1384 1385 1386 1387 1388 1389 void</nobr> 1390 </td> 1391 <td class="jd-linkcol" width="100%"><nobr> 1392 <span class="sympad"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#applyItemPosition(java.lang.Object, android.graphics.Point)">applyItemPosition</a></span>(Object object, Point position)</nobr> 1393 1394 <div class="jd-descrdiv"> 1395 Called after <code><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#getItemPosition(java.lang.Object)">getItemPosition(Object)</a></code> to allow superclasses to update their 1396 internal bookkeeping if a subclass has overridden <code><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#getItemPosition(java.lang.Object)">getItemPosition(Object)</a></code>. 1397 1398 1399 1400 </div> 1401 1402 </td></tr> 1403 1404 1405 1406</table> 1407 1408 1409 1410 1411 1412<!-- ========== METHOD SUMMARY =========== --> 1413<table id="inhmethods" class="jd-sumtable"><tr><th> 1414 <a href="#" class="toggle-all" onclick="return toggleAllInherited(this, null)">[Expand]</a> 1415 <div style="clear:left;">Inherited Methods</div></th></tr> 1416 1417 1418<tr class="api apilevel-" > 1419<td colspan="12"> 1420 <a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-java.lang.Object" class="jd-expando-trigger closed" 1421 ><img id="inherited-methods-java.lang.Object-trigger" 1422 src="../../../../../assets/images/triangle-closed.png" 1423 class="jd-expando-trigger-img" /></a> 1424From class 1425 1426 java.lang.Object 1427 1428<div id="inherited-methods-java.lang.Object"> 1429 <div id="inherited-methods-java.lang.Object-list" 1430 class="jd-inheritedlinks"> 1431 </div> 1432 <div id="inherited-methods-java.lang.Object-summary" style="display: none;"> 1433 <table class="jd-sumtable-expando"> 1434 1435 1436 1437 1438 <tr class="alt-color api apilevel-" > 1439 <td class="jd-typecol"><nobr> 1440 1441 1442 1443 1444 1445 Object</nobr> 1446 </td> 1447 <td class="jd-linkcol" width="100%"><nobr> 1448 <span class="sympad">clone</span>()</nobr> 1449 1450 </td></tr> 1451 1452 1453 1454 <tr class=" api apilevel-" > 1455 <td class="jd-typecol"><nobr> 1456 1457 1458 1459 1460 1461 boolean</nobr> 1462 </td> 1463 <td class="jd-linkcol" width="100%"><nobr> 1464 <span class="sympad">equals</span>(Object arg0)</nobr> 1465 1466 </td></tr> 1467 1468 1469 1470 <tr class="alt-color api apilevel-" > 1471 <td class="jd-typecol"><nobr> 1472 1473 1474 1475 1476 1477 void</nobr> 1478 </td> 1479 <td class="jd-linkcol" width="100%"><nobr> 1480 <span class="sympad">finalize</span>()</nobr> 1481 1482 </td></tr> 1483 1484 1485 1486 <tr class=" api apilevel-" > 1487 <td class="jd-typecol"><nobr> 1488 1489 1490 final 1491 1492 1493 Class<?></nobr> 1494 </td> 1495 <td class="jd-linkcol" width="100%"><nobr> 1496 <span class="sympad">getClass</span>()</nobr> 1497 1498 </td></tr> 1499 1500 1501 1502 <tr class="alt-color api apilevel-" > 1503 <td class="jd-typecol"><nobr> 1504 1505 1506 1507 1508 1509 int</nobr> 1510 </td> 1511 <td class="jd-linkcol" width="100%"><nobr> 1512 <span class="sympad">hashCode</span>()</nobr> 1513 1514 </td></tr> 1515 1516 1517 1518 <tr class=" api apilevel-" > 1519 <td class="jd-typecol"><nobr> 1520 1521 1522 final 1523 1524 1525 void</nobr> 1526 </td> 1527 <td class="jd-linkcol" width="100%"><nobr> 1528 <span class="sympad">notify</span>()</nobr> 1529 1530 </td></tr> 1531 1532 1533 1534 <tr class="alt-color api apilevel-" > 1535 <td class="jd-typecol"><nobr> 1536 1537 1538 final 1539 1540 1541 void</nobr> 1542 </td> 1543 <td class="jd-linkcol" width="100%"><nobr> 1544 <span class="sympad">notifyAll</span>()</nobr> 1545 1546 </td></tr> 1547 1548 1549 1550 <tr class=" api apilevel-" > 1551 <td class="jd-typecol"><nobr> 1552 1553 1554 1555 1556 1557 String</nobr> 1558 </td> 1559 <td class="jd-linkcol" width="100%"><nobr> 1560 <span class="sympad">toString</span>()</nobr> 1561 1562 </td></tr> 1563 1564 1565 1566 <tr class="alt-color api apilevel-" > 1567 <td class="jd-typecol"><nobr> 1568 1569 1570 final 1571 1572 1573 void</nobr> 1574 </td> 1575 <td class="jd-linkcol" width="100%"><nobr> 1576 <span class="sympad">wait</span>()</nobr> 1577 1578 </td></tr> 1579 1580 1581 1582 <tr class=" api apilevel-" > 1583 <td class="jd-typecol"><nobr> 1584 1585 1586 final 1587 1588 1589 void</nobr> 1590 </td> 1591 <td class="jd-linkcol" width="100%"><nobr> 1592 <span class="sympad">wait</span>(long arg0, int arg1)</nobr> 1593 1594 </td></tr> 1595 1596 1597 1598 <tr class="alt-color api apilevel-" > 1599 <td class="jd-typecol"><nobr> 1600 1601 1602 final 1603 1604 1605 void</nobr> 1606 </td> 1607 <td class="jd-linkcol" width="100%"><nobr> 1608 <span class="sympad">wait</span>(long arg0)</nobr> 1609 1610 </td></tr> 1611 1612 1613</table> 1614 </div> 1615</div> 1616</td></tr> 1617 1618 1619</table> 1620 1621 1622</div><!-- jd-descr (summary) --> 1623 1624<!-- Details --> 1625 1626 1627 1628 1629 1630 1631 1632 1633<!-- XML Attributes --> 1634 1635 1636<!-- Enum Values --> 1637 1638 1639<!-- Constants --> 1640 1641 1642<!-- ========= ENUM CONSTANTS DETAIL ======== --> 1643<h2>Constants</h2> 1644 1645 1646 1647 1648<A NAME="OPTION_DISABLE_PARALLAX"></A> 1649 1650<div class="jd-details api apilevel-"> 1651 <h4 class="jd-details-title"> 1652 <span class="normal"> 1653 public 1654 static 1655 final 1656 int 1657 </span> 1658 OPTION_DISABLE_PARALLAX 1659 </h4> 1660 <div class="api-level"> 1661 1662 1663 1664 1665 </div> 1666 <div class="jd-details-descr"> 1667 1668 1669 1670 1671 <div class="jd-tagdata jd-tagdescr"><p>Disables zooming and parallax scrolling of the background. 1672</p></div> 1673 1674 1675 <div class="jd-tagdata"> 1676 <span class="jd-tagtitle">Constant Value: </span> 1677 <span> 1678 1679 1 1680 (0x00000001) 1681 1682 </span> 1683 </div> 1684 1685 </div> 1686</div> 1687 1688 1689 1690<A NAME="PAGE_DEFAULT_OPTIONS"></A> 1691 1692<div class="jd-details api apilevel-"> 1693 <h4 class="jd-details-title"> 1694 <span class="normal"> 1695 public 1696 static 1697 final 1698 int 1699 </span> 1700 PAGE_DEFAULT_OPTIONS 1701 </h4> 1702 <div class="api-level"> 1703 1704 1705 1706 1707 </div> 1708 <div class="jd-details-descr"> 1709 1710 1711 1712 1713 <div class="jd-tagdata jd-tagdescr"><p>Default background options. Parallax scrolling is enabled. 1714</p></div> 1715 1716 1717 <div class="jd-tagdata"> 1718 <span class="jd-tagtitle">Constant Value: </span> 1719 <span> 1720 1721 0 1722 (0x00000000) 1723 1724 </span> 1725 </div> 1726 1727 </div> 1728</div> 1729 1730 1731 1732 1733<!-- Fields --> 1734 1735 1736<!-- ========= FIELD DETAIL ======== --> 1737<h2>Fields</h2> 1738 1739 1740 1741 1742<A NAME="BACKGROUND_NONE"></A> 1743 1744<div class="jd-details api apilevel-"> 1745 <h4 class="jd-details-title"> 1746 <span class="normal"> 1747 public 1748 static 1749 final 1750 Drawable 1751 </span> 1752 BACKGROUND_NONE 1753 </h4> 1754 <div class="api-level"> 1755 1756 1757 1758 1759 </div> 1760 <div class="jd-details-descr"> 1761 1762 1763 1764 1765 <div class="jd-tagdata jd-tagdescr"><p>This value indicates that no background should drawn. See <code><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#getBackgroundForRow(int)">getBackgroundForRow(int)</a></code> and 1766 <code><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#getBackgroundForPage(int, int)">getBackgroundForPage(int, int)</a></code> for specific effects. 1767</p></div> 1768 1769 1770 </div> 1771</div> 1772 1773 1774 1775<A NAME="POSITION_NONE"></A> 1776 1777<div class="jd-details api apilevel-"> 1778 <h4 class="jd-details-title"> 1779 <span class="normal"> 1780 public 1781 static 1782 final 1783 Point 1784 </span> 1785 POSITION_NONE 1786 </h4> 1787 <div class="api-level"> 1788 1789 1790 1791 1792 </div> 1793 <div class="jd-details-descr"> 1794 1795 1796 1797 1798 <div class="jd-tagdata jd-tagdescr"><p></p></div> 1799 1800 1801 </div> 1802</div> 1803 1804 1805 1806<A NAME="POSITION_UNCHANGED"></A> 1807 1808<div class="jd-details api apilevel-"> 1809 <h4 class="jd-details-title"> 1810 <span class="normal"> 1811 public 1812 static 1813 final 1814 Point 1815 </span> 1816 POSITION_UNCHANGED 1817 </h4> 1818 <div class="api-level"> 1819 1820 1821 1822 1823 </div> 1824 <div class="jd-details-descr"> 1825 1826 1827 1828 1829 <div class="jd-tagdata jd-tagdescr"><p></p></div> 1830 1831 1832 </div> 1833</div> 1834 1835 1836 1837 1838<!-- Public ctors --> 1839 1840 1841<!-- ========= CONSTRUCTOR DETAIL ======== --> 1842<h2>Public Constructors</h2> 1843 1844 1845 1846<A NAME="GridPagerAdapter()"></A> 1847 1848<div class="jd-details api apilevel-"> 1849 <h4 class="jd-details-title"> 1850 <span class="normal"> 1851 public 1852 1853 1854 1855 1856 1857 </span> 1858 <span class="sympad">GridPagerAdapter</span> 1859 <span class="normal">()</span> 1860 </h4> 1861 <div class="api-level"> 1862 <div></div> 1863 1864 1865 1866 </div> 1867 <div class="jd-details-descr"> 1868 1869 1870 1871 1872 <div class="jd-tagdata jd-tagdescr"><p></p></div> 1873 1874 </div> 1875</div> 1876 1877 1878 1879 1880 1881<!-- ========= CONSTRUCTOR DETAIL ======== --> 1882<!-- Protected ctors --> 1883 1884 1885 1886<!-- ========= METHOD DETAIL ======== --> 1887<!-- Public methdos --> 1888 1889<h2>Public Methods</h2> 1890 1891 1892 1893<A NAME="destroyItem(android.view.ViewGroup, int, int, java.lang.Object)"></A> 1894 1895<div class="jd-details api apilevel-"> 1896 <h4 class="jd-details-title"> 1897 <span class="normal"> 1898 public 1899 1900 1901 abstract 1902 1903 void 1904 </span> 1905 <span class="sympad">destroyItem</span> 1906 <span class="normal">(ViewGroup container, int row, int column, Object object)</span> 1907 </h4> 1908 <div class="api-level"> 1909 <div></div> 1910 1911 1912 1913 </div> 1914 <div class="jd-details-descr"> 1915 1916 1917 1918 1919 <div class="jd-tagdata jd-tagdescr"><p>Removes a page for the given position. The adapter is responsible for removing the view from 1920 its container, although it only must ensure this is done by the time it returns from 1921 <code><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#finishUpdate(android.view.ViewGroup)">finishUpdate(ViewGroup)</a></code>.</p></div> 1922 <div class="jd-tagdata"> 1923 <h5 class="jd-tagtitle">Parameters</h5> 1924 <table class="jd-tagtable"> 1925 <tr> 1926 <th>container</td> 1927 <td>The containing View from which the page will be removed.</td> 1928 </tr> 1929 <tr> 1930 <th>row</td> 1931 <td>the row to be destroyed</td> 1932 </tr> 1933 <tr> 1934 <th>column</td> 1935 <td>the column within the row to be destroyed</td> 1936 </tr> 1937 <tr> 1938 <th>object</td> 1939 <td>The same object that was returned by 1940 <code><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#instantiateItem(android.view.ViewGroup, int, int)">instantiateItem(ViewGroup, int, int)</a></code>. 1941</td> 1942 </tr> 1943 </table> 1944 </div> 1945 1946 </div> 1947</div> 1948 1949 1950<A NAME="finishUpdate(android.view.ViewGroup)"></A> 1951 1952<div class="jd-details api apilevel-"> 1953 <h4 class="jd-details-title"> 1954 <span class="normal"> 1955 public 1956 1957 1958 1959 1960 void 1961 </span> 1962 <span class="sympad">finishUpdate</span> 1963 <span class="normal">(ViewGroup container)</span> 1964 </h4> 1965 <div class="api-level"> 1966 <div></div> 1967 1968 1969 1970 </div> 1971 <div class="jd-details-descr"> 1972 1973 1974 1975 1976 <div class="jd-tagdata jd-tagdescr"><p>Called when the a change in the shown pages has been completed. At this point you must ensure 1977 that all of the pages have actually been added or removed from the container as appropriate.</p></div> 1978 <div class="jd-tagdata"> 1979 <h5 class="jd-tagtitle">Parameters</h5> 1980 <table class="jd-tagtable"> 1981 <tr> 1982 <th>container</td> 1983 <td>The containing View which is displaying this adapter's page views 1984</td> 1985 </tr> 1986 </table> 1987 </div> 1988 1989 </div> 1990</div> 1991 1992 1993<A NAME="getBackgroundForPage(int, int)"></A> 1994 1995<div class="jd-details api apilevel-"> 1996 <h4 class="jd-details-title"> 1997 <span class="normal"> 1998 public 1999 2000 2001 2002 2003 Drawable 2004 </span> 2005 <span class="sympad">getBackgroundForPage</span> 2006 <span class="normal">(int row, int column)</span> 2007 </h4> 2008 <div class="api-level"> 2009 <div></div> 2010 2011 2012 2013 </div> 2014 <div class="jd-details-descr"> 2015 2016 2017 2018 2019 <div class="jd-tagdata jd-tagdescr"><p>Provides content to be displayed as background for a specific page. 2020 <p> 2021 The return value <code><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#BACKGROUND_NONE">BACKGROUND_NONE</a></code> indicates that there is no page-specific background. 2022 and the row background should be used (if any). 2023 <p> 2024 The return value of this method can be cached. <code><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#notifyPageBackgroundChanged(int, int)">notifyPageBackgroundChanged(int, int)</a></code> may be 2025 used to invalidate a previously returned value. <code><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#getBackgroundForPage(int, int)">getBackgroundForPage(int, int)</a></code> will then be 2026 called to request the new value when necessary.</p></div> 2027 <div class="jd-tagdata"> 2028 <h5 class="jd-tagtitle">Parameters</h5> 2029 <table class="jd-tagtable"> 2030 <tr> 2031 <th>row</td> 2032 <td>the row of the page</td> 2033 </tr> 2034 <tr> 2035 <th>column</td> 2036 <td>the column of the page 2037</td> 2038 </tr> 2039 </table> 2040 </div> 2041 2042 </div> 2043</div> 2044 2045 2046<A NAME="getBackgroundForRow(int)"></A> 2047 2048<div class="jd-details api apilevel-"> 2049 <h4 class="jd-details-title"> 2050 <span class="normal"> 2051 public 2052 2053 2054 2055 2056 Drawable 2057 </span> 2058 <span class="sympad">getBackgroundForRow</span> 2059 <span class="normal">(int row)</span> 2060 </h4> 2061 <div class="api-level"> 2062 <div></div> 2063 2064 2065 2066 </div> 2067 <div class="jd-details-descr"> 2068 2069 2070 2071 2072 <div class="jd-tagdata jd-tagdescr"><p>Provides content to be displayed as the default background for all pages on the given row. 2073 <p> 2074 The return value <code><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#BACKGROUND_NONE">BACKGROUND_NONE</a></code> causes no background to be displayed, except for 2075 those applied by <code><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#getBackgroundForPage(int, int)">getBackgroundForPage(int, int)</a></code>. 2076 <p> 2077 The return value of this method can be cached. <code><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#notifyRowBackgroundChanged(int)">notifyRowBackgroundChanged(int)</a></code> may be 2078 used to invalidate a previously returned value. <code><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#getBackgroundForRow(int)">getBackgroundForRow(int)</a></code> will then be 2079 called to request the new value when necessary.</p></div> 2080 <div class="jd-tagdata"> 2081 <h5 class="jd-tagtitle">Parameters</h5> 2082 <table class="jd-tagtable"> 2083 <tr> 2084 <th>row</td> 2085 <td>the row of the page</td> 2086 </tr> 2087 </table> 2088 </div> 2089 <div class="jd-tagdata"> 2090 <h5 class="jd-tagtitle">Returns</h5> 2091 <ul class="nolist"><li>a drawable to display for the row 2092</li></ul> 2093 </div> 2094 2095 </div> 2096</div> 2097 2098 2099<A NAME="getColumnCount(int)"></A> 2100 2101<div class="jd-details api apilevel-"> 2102 <h4 class="jd-details-title"> 2103 <span class="normal"> 2104 public 2105 2106 2107 abstract 2108 2109 int 2110 </span> 2111 <span class="sympad">getColumnCount</span> 2112 <span class="normal">(int row)</span> 2113 </h4> 2114 <div class="api-level"> 2115 <div></div> 2116 2117 2118 2119 </div> 2120 <div class="jd-details-descr"> 2121 2122 2123 2124 2125 <div class="jd-tagdata jd-tagdescr"><p>Returns the maximum number of columns for each row. The number of columns may vary by row. 2126</p></div> 2127 2128 </div> 2129</div> 2130 2131 2132<A NAME="getCurrentColumnForRow(int, int)"></A> 2133 2134<div class="jd-details api apilevel-"> 2135 <h4 class="jd-details-title"> 2136 <span class="normal"> 2137 public 2138 2139 2140 2141 2142 int 2143 </span> 2144 <span class="sympad">getCurrentColumnForRow</span> 2145 <span class="normal">(int row, int currentColumn)</span> 2146 </h4> 2147 <div class="api-level"> 2148 <div></div> 2149 2150 2151 2152 </div> 2153 <div class="jd-details-descr"> 2154 2155 2156 2157 2158 <div class="jd-tagdata jd-tagdescr"><p>Returns the column to arrive at when navigating vertically to the specified row. 2159 <p> 2160 The default implementation simply returns 0.</p></div> 2161 <div class="jd-tagdata"> 2162 <h5 class="jd-tagtitle">Parameters</h5> 2163 <table class="jd-tagtable"> 2164 <tr> 2165 <th>row</td> 2166 <td>the row in question</td> 2167 </tr> 2168 <tr> 2169 <th>currentColumn</td> 2170 <td>the column which is currently centered</td> 2171 </tr> 2172 </table> 2173 </div> 2174 <div class="jd-tagdata"> 2175 <h5 class="jd-tagtitle">Returns</h5> 2176 <ul class="nolist"><li>the column to arrive at 2177</li></ul> 2178 </div> 2179 2180 </div> 2181</div> 2182 2183 2184<A NAME="getItemPosition(java.lang.Object)"></A> 2185 2186<div class="jd-details api apilevel-"> 2187 <h4 class="jd-details-title"> 2188 <span class="normal"> 2189 public 2190 2191 2192 2193 2194 Point 2195 </span> 2196 <span class="sympad">getItemPosition</span> 2197 <span class="normal">(Object object)</span> 2198 </h4> 2199 <div class="api-level"> 2200 <div></div> 2201 2202 2203 2204 </div> 2205 <div class="jd-details-descr"> 2206 2207 2208 2209 2210 <div class="jd-tagdata jd-tagdescr"><p>Called when the host view is attempting to determine if an item's position has changed. 2211 Returns <code><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#POSITION_UNCHANGED">POSITION_UNCHANGED</a></code> if the position of the given item has not changed or 2212 <code><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#POSITION_NONE">POSITION_NONE</a></code> if the item is no longer present in the adapter. 2213 <p> 2214 The default implementation assumes that all items have been removed and always returns 2215 <code><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#POSITION_NONE">POSITION_NONE</a></code>. This causes all fragments to be detached and re-attached as needed.</p></div> 2216 <div class="jd-tagdata"> 2217 <h5 class="jd-tagtitle">Parameters</h5> 2218 <table class="jd-tagtable"> 2219 <tr> 2220 <th>object</td> 2221 <td>Object representing an item, previously returned by a call to 2222 <code><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#instantiateItem(android.view.ViewGroup, int, int)">instantiateItem(ViewGroup, int, int)</a></code>.</td> 2223 </tr> 2224 </table> 2225 </div> 2226 <div class="jd-tagdata"> 2227 <h5 class="jd-tagtitle">Returns</h5> 2228 <ul class="nolist"><li>object's new position with row from [0, getRowCount()] and column from [0, 2229 getColumnCount(row)], <code><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#POSITION_UNCHANGED">POSITION_UNCHANGED</a></code> if the object's position has not 2230 changed, or <code><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#POSITION_NONE">POSITION_NONE</a></code> if the item is no longer present. 2231</li></ul> 2232 </div> 2233 2234 </div> 2235</div> 2236 2237 2238<A NAME="getOptionsForPage(int, int)"></A> 2239 2240<div class="jd-details api apilevel-"> 2241 <h4 class="jd-details-title"> 2242 <span class="normal"> 2243 public 2244 2245 2246 2247 2248 int 2249 </span> 2250 <span class="sympad">getOptionsForPage</span> 2251 <span class="normal">(int row, int column)</span> 2252 </h4> 2253 <div class="api-level"> 2254 <div></div> 2255 2256 2257 2258 </div> 2259 <div class="jd-details-descr"> 2260 2261 2262 2263 2264 <div class="jd-tagdata jd-tagdescr"><p>Provides a set of features to apply to a page background. The return value should be a 2265 combination of one or more of the following, combined via bitwise-or: 2266 <ul> 2267 <li> <code><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#OPTION_DISABLE_PARALLAX">OPTION_DISABLE_PARALLAX</a></code> 2268 </ul> 2269 The default return value is <code><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#PAGE_DEFAULT_OPTIONS">PAGE_DEFAULT_OPTIONS</a></code>.</p></div> 2270 <div class="jd-tagdata"> 2271 <h5 class="jd-tagtitle">Parameters</h5> 2272 <table class="jd-tagtable"> 2273 <tr> 2274 <th>row</td> 2275 <td>the row of the page</td> 2276 </tr> 2277 <tr> 2278 <th>column</td> 2279 <td>the column of the page</td> 2280 </tr> 2281 </table> 2282 </div> 2283 <div class="jd-tagdata"> 2284 <h5 class="jd-tagtitle">Returns</h5> 2285 <ul class="nolist"><li>a bitwise OR of all requested options 2286</li></ul> 2287 </div> 2288 2289 </div> 2290</div> 2291 2292 2293<A NAME="getRowCount()"></A> 2294 2295<div class="jd-details api apilevel-"> 2296 <h4 class="jd-details-title"> 2297 <span class="normal"> 2298 public 2299 2300 2301 abstract 2302 2303 int 2304 </span> 2305 <span class="sympad">getRowCount</span> 2306 <span class="normal">()</span> 2307 </h4> 2308 <div class="api-level"> 2309 <div></div> 2310 2311 2312 2313 </div> 2314 <div class="jd-details-descr"> 2315 2316 2317 2318 2319 <div class="jd-tagdata jd-tagdescr"><p>Returns the number of rows available. 2320</p></div> 2321 2322 </div> 2323</div> 2324 2325 2326<A NAME="instantiateItem(android.view.ViewGroup, int, int)"></A> 2327 2328<div class="jd-details api apilevel-"> 2329 <h4 class="jd-details-title"> 2330 <span class="normal"> 2331 public 2332 2333 2334 abstract 2335 2336 Object 2337 </span> 2338 <span class="sympad">instantiateItem</span> 2339 <span class="normal">(ViewGroup container, int row, int column)</span> 2340 </h4> 2341 <div class="api-level"> 2342 <div></div> 2343 2344 2345 2346 </div> 2347 <div class="jd-details-descr"> 2348 2349 2350 2351 2352 <div class="jd-tagdata jd-tagdescr"><p>Creates the page for the given position. The adapter is responsible for adding the view to 2353 the container given here, although it only must ensure this is done by the time it returns 2354 from <code><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#finishUpdate(android.view.ViewGroup)">finishUpdate(ViewGroup)</a></code></p></div> 2355 <div class="jd-tagdata"> 2356 <h5 class="jd-tagtitle">Parameters</h5> 2357 <table class="jd-tagtable"> 2358 <tr> 2359 <th>container</td> 2360 <td>containing View in which the page will be shown</td> 2361 </tr> 2362 <tr> 2363 <th>row</td> 2364 <td>the row to be instantiated</td> 2365 </tr> 2366 <tr> 2367 <th>column</td> 2368 <td>the column within the row to be instantiated</td> 2369 </tr> 2370 </table> 2371 </div> 2372 <div class="jd-tagdata"> 2373 <h5 class="jd-tagtitle">Returns</h5> 2374 <ul class="nolist"><li>a an object representing the new page 2375</li></ul> 2376 </div> 2377 2378 </div> 2379</div> 2380 2381 2382<A NAME="isViewFromObject(android.view.View, java.lang.Object)"></A> 2383 2384<div class="jd-details api apilevel-"> 2385 <h4 class="jd-details-title"> 2386 <span class="normal"> 2387 public 2388 2389 2390 abstract 2391 2392 boolean 2393 </span> 2394 <span class="sympad">isViewFromObject</span> 2395 <span class="normal">(View view, Object object)</span> 2396 </h4> 2397 <div class="api-level"> 2398 <div></div> 2399 2400 2401 2402 </div> 2403 <div class="jd-details-descr"> 2404 2405 2406 2407 2408 <div class="jd-tagdata jd-tagdescr"><p>Determines whether a page View is associated with a specific key object as returned by 2409 <code><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#instantiateItem(android.view.ViewGroup, int, int)">instantiateItem(ViewGroup, int, int)</a></code>. This method is required for a PagerAdapter to 2410 function properly.</p></div> 2411 <div class="jd-tagdata"> 2412 <h5 class="jd-tagtitle">Parameters</h5> 2413 <table class="jd-tagtable"> 2414 <tr> 2415 <th>view</td> 2416 <td>Page View to check for association with <code>object</code></td> 2417 </tr> 2418 <tr> 2419 <th>object</td> 2420 <td>Object to check for association with <code>view</code></td> 2421 </tr> 2422 </table> 2423 </div> 2424 <div class="jd-tagdata"> 2425 <h5 class="jd-tagtitle">Returns</h5> 2426 <ul class="nolist"><li>true if <code>view</code> is associated with the key object <code>object</code> 2427</li></ul> 2428 </div> 2429 2430 </div> 2431</div> 2432 2433 2434<A NAME="notifyDataSetChanged()"></A> 2435 2436<div class="jd-details api apilevel-"> 2437 <h4 class="jd-details-title"> 2438 <span class="normal"> 2439 public 2440 2441 2442 2443 2444 void 2445 </span> 2446 <span class="sympad">notifyDataSetChanged</span> 2447 <span class="normal">()</span> 2448 </h4> 2449 <div class="api-level"> 2450 <div></div> 2451 2452 2453 2454 </div> 2455 <div class="jd-details-descr"> 2456 2457 2458 2459 2460 <div class="jd-tagdata jd-tagdescr"><p>This method should be called by the application if the data backing this adapter has changed 2461 and associated views should update. 2462</p></div> 2463 2464 </div> 2465</div> 2466 2467 2468<A NAME="notifyPageBackgroundChanged(int, int)"></A> 2469 2470<div class="jd-details api apilevel-"> 2471 <h4 class="jd-details-title"> 2472 <span class="normal"> 2473 public 2474 2475 2476 2477 2478 void 2479 </span> 2480 <span class="sympad">notifyPageBackgroundChanged</span> 2481 <span class="normal">(int row, int column)</span> 2482 </h4> 2483 <div class="api-level"> 2484 <div></div> 2485 2486 2487 2488 </div> 2489 <div class="jd-details-descr"> 2490 2491 2492 2493 2494 <div class="jd-tagdata jd-tagdescr"><p>This method should be called if the value returned by <code><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#getBackgroundForPage(int, int)">getBackgroundForPage(int, int)</a></code> 2495 or options returned by <code><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#getOptionsForPage(int, int)">getOptionsForPage(int, int)</a></code> change. Any cached value are 2496 removed and the the new value will be requested when necessary. 2497</p></div> 2498 2499 </div> 2500</div> 2501 2502 2503<A NAME="notifyRowBackgroundChanged(int)"></A> 2504 2505<div class="jd-details api apilevel-"> 2506 <h4 class="jd-details-title"> 2507 <span class="normal"> 2508 public 2509 2510 2511 2512 2513 void 2514 </span> 2515 <span class="sympad">notifyRowBackgroundChanged</span> 2516 <span class="normal">(int row)</span> 2517 </h4> 2518 <div class="api-level"> 2519 <div></div> 2520 2521 2522 2523 </div> 2524 <div class="jd-details-descr"> 2525 2526 2527 2528 2529 <div class="jd-tagdata jd-tagdescr"><p>This method should be called if the value returned by <code><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#getBackgroundForRow(int)">getBackgroundForRow(int)</a></code> 2530 changes. Any cached value is removed and the the new value will be requested when necessary. 2531</p></div> 2532 2533 </div> 2534</div> 2535 2536 2537<A NAME="registerDataSetObserver(android.database.DataSetObserver)"></A> 2538 2539<div class="jd-details api apilevel-"> 2540 <h4 class="jd-details-title"> 2541 <span class="normal"> 2542 public 2543 2544 2545 2546 2547 void 2548 </span> 2549 <span class="sympad">registerDataSetObserver</span> 2550 <span class="normal">(DataSetObserver observer)</span> 2551 </h4> 2552 <div class="api-level"> 2553 <div></div> 2554 2555 2556 2557 </div> 2558 <div class="jd-details-descr"> 2559 2560 2561 2562 2563 <div class="jd-tagdata jd-tagdescr"><p>Register an observer to receive callbacks related to the adapter's data changing.</p></div> 2564 <div class="jd-tagdata"> 2565 <h5 class="jd-tagtitle">Parameters</h5> 2566 <table class="jd-tagtable"> 2567 <tr> 2568 <th>observer</td> 2569 <td>The <code><a href="../../../../../reference/android/database/DataSetObserver.html">DataSetObserver</a></code> which will receive callbacks. 2570</td> 2571 </tr> 2572 </table> 2573 </div> 2574 2575 </div> 2576</div> 2577 2578 2579<A NAME="restoreState(android.os.Parcelable, java.lang.ClassLoader)"></A> 2580 2581<div class="jd-details api apilevel-"> 2582 <h4 class="jd-details-title"> 2583 <span class="normal"> 2584 public 2585 2586 2587 2588 2589 void 2590 </span> 2591 <span class="sympad">restoreState</span> 2592 <span class="normal">(Parcelable savedState, ClassLoader classLoader)</span> 2593 </h4> 2594 <div class="api-level"> 2595 <div></div> 2596 2597 2598 2599 </div> 2600 <div class="jd-details-descr"> 2601 2602 2603 2604 2605 <div class="jd-tagdata jd-tagdescr"><p>Restores the previously saved state of this adapter. 2606</p></div> 2607 2608 </div> 2609</div> 2610 2611 2612<A NAME="saveState()"></A> 2613 2614<div class="jd-details api apilevel-"> 2615 <h4 class="jd-details-title"> 2616 <span class="normal"> 2617 public 2618 2619 2620 2621 2622 Parcelable 2623 </span> 2624 <span class="sympad">saveState</span> 2625 <span class="normal">()</span> 2626 </h4> 2627 <div class="api-level"> 2628 <div></div> 2629 2630 2631 2632 </div> 2633 <div class="jd-details-descr"> 2634 2635 2636 2637 2638 <div class="jd-tagdata jd-tagdescr"><p>Saves the current state of this adapter. 2639</p></div> 2640 2641 </div> 2642</div> 2643 2644 2645<A NAME="setCurrentColumnForRow(int, int)"></A> 2646 2647<div class="jd-details api apilevel-"> 2648 <h4 class="jd-details-title"> 2649 <span class="normal"> 2650 public 2651 2652 2653 2654 2655 void 2656 </span> 2657 <span class="sympad">setCurrentColumnForRow</span> 2658 <span class="normal">(int row, int currentColumn)</span> 2659 </h4> 2660 <div class="api-level"> 2661 <div></div> 2662 2663 2664 2665 </div> 2666 <div class="jd-details-descr"> 2667 2668 2669 2670 2671 <div class="jd-tagdata jd-tagdescr"><p>Called to inform the adapter of which column is now current for the given row. This 2672 information could be stored and used to implement <code><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#getCurrentColumnForRow(int, int)">getCurrentColumnForRow(int, int)</a></code>. 2673 The default implementation does nothing.</p></div> 2674 <div class="jd-tagdata"> 2675 <h5 class="jd-tagtitle">Parameters</h5> 2676 <table class="jd-tagtable"> 2677 <tr> 2678 <th>row</td> 2679 <td>the row for the column change</td> 2680 </tr> 2681 <tr> 2682 <th>currentColumn</td> 2683 <td>the column which is now current 2684</td> 2685 </tr> 2686 </table> 2687 </div> 2688 2689 </div> 2690</div> 2691 2692 2693<A NAME="startUpdate(android.view.ViewGroup)"></A> 2694 2695<div class="jd-details api apilevel-"> 2696 <h4 class="jd-details-title"> 2697 <span class="normal"> 2698 public 2699 2700 2701 2702 2703 void 2704 </span> 2705 <span class="sympad">startUpdate</span> 2706 <span class="normal">(ViewGroup container)</span> 2707 </h4> 2708 <div class="api-level"> 2709 <div></div> 2710 2711 2712 2713 </div> 2714 <div class="jd-details-descr"> 2715 2716 2717 2718 2719 <div class="jd-tagdata jd-tagdescr"><p>Called when a change in the shown pages is going to start being made.</p></div> 2720 <div class="jd-tagdata"> 2721 <h5 class="jd-tagtitle">Parameters</h5> 2722 <table class="jd-tagtable"> 2723 <tr> 2724 <th>container</td> 2725 <td>The containing View which is displaying this adapter's page views. 2726</td> 2727 </tr> 2728 </table> 2729 </div> 2730 2731 </div> 2732</div> 2733 2734 2735<A NAME="unregisterDataSetObserver(android.database.DataSetObserver)"></A> 2736 2737<div class="jd-details api apilevel-"> 2738 <h4 class="jd-details-title"> 2739 <span class="normal"> 2740 public 2741 2742 2743 2744 2745 void 2746 </span> 2747 <span class="sympad">unregisterDataSetObserver</span> 2748 <span class="normal">(DataSetObserver observer)</span> 2749 </h4> 2750 <div class="api-level"> 2751 <div></div> 2752 2753 2754 2755 </div> 2756 <div class="jd-details-descr"> 2757 2758 2759 2760 2761 <div class="jd-tagdata jd-tagdescr"><p>Unregister an observer from callbacks related to the adapter's data changing.</p></div> 2762 <div class="jd-tagdata"> 2763 <h5 class="jd-tagtitle">Parameters</h5> 2764 <table class="jd-tagtable"> 2765 <tr> 2766 <th>observer</td> 2767 <td>The <code><a href="../../../../../reference/android/database/DataSetObserver.html">DataSetObserver</a></code> which will be unregistered. 2768</td> 2769 </tr> 2770 </table> 2771 </div> 2772 2773 </div> 2774</div> 2775 2776 2777 2778 2779 2780<!-- ========= METHOD DETAIL ======== --> 2781 2782<h2>Protected Methods</h2> 2783 2784 2785 2786<A NAME="applyItemPosition(java.lang.Object, android.graphics.Point)"></A> 2787 2788<div class="jd-details api apilevel-"> 2789 <h4 class="jd-details-title"> 2790 <span class="normal"> 2791 protected 2792 2793 2794 2795 2796 void 2797 </span> 2798 <span class="sympad">applyItemPosition</span> 2799 <span class="normal">(Object object, Point position)</span> 2800 </h4> 2801 <div class="api-level"> 2802 <div></div> 2803 2804 2805 2806 </div> 2807 <div class="jd-details-descr"> 2808 2809 2810 2811 2812 <div class="jd-tagdata jd-tagdescr"><p>Called after <code><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#getItemPosition(java.lang.Object)">getItemPosition(Object)</a></code> to allow superclasses to update their 2813 internal bookkeeping if a subclass has overridden <code><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#getItemPosition(java.lang.Object)">getItemPosition(Object)</a></code>.</p></div> 2814 <div class="jd-tagdata"> 2815 <h5 class="jd-tagtitle">Parameters</h5> 2816 <table class="jd-tagtable"> 2817 <tr> 2818 <th>object</td> 2819 <td>Object representing the item passed to <code><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#getItemPosition(java.lang.Object)">getItemPosition(Object)</a></code>.</td> 2820 </tr> 2821 <tr> 2822 <th>position</td> 2823 <td>position which was returned from <code><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#getItemPosition(java.lang.Object)">getItemPosition(Object)</a></code>. 2824</td> 2825 </tr> 2826 </table> 2827 </div> 2828 2829 </div> 2830</div> 2831 2832 2833 2834 2835 2836<!-- ========= END OF CLASS DATA ========= --> 2837<A NAME="navbar_top"></A> 2838</div> <!-- jd-content --> 2839 2840<div class="wrap"> 2841 <div class="dac-footer"> 2842 <div class="cols dac-footer-main"> 2843 <div class="col-1of2"> 2844 <a class="dac-footer-getnews" data-modal-toggle="newsletter" href="javascript:;">Get news & tips <span 2845 class="dac-fab dac-primary"><i class="dac-sprite dac-mail"></i></span></a> 2846 </div> 2847 <div class="col-1of2 dac-footer-reachout"> 2848 <div class="dac-footer-contact"> 2849 <a class="dac-footer-contact-link" href="http://android-developers.blogspot.com/">Blog</a> 2850 <a class="dac-footer-contact-link" href="/support.html">Support</a> 2851 </div> 2852 <div class="dac-footer-social"> 2853 <a class="dac-fab dac-footer-social-link" href="https://www.youtube.com/user/androiddevelopers"><i class="dac-sprite dac-youtube"></i></a> 2854 <a class="dac-fab dac-footer-social-link" href="https://plus.google.com/+AndroidDevelopers"><i class="dac-sprite dac-gplus"></i></a> 2855 <a class="dac-fab dac-footer-social-link" href="https://twitter.com/AndroidDev"><i class="dac-sprite dac-twitter"></i></a> 2856 </div> 2857 </div> 2858 </div> 2859 2860 <hr class="dac-footer-separator"/> 2861 2862 2863 <p class="dac-footer-copyright"> 2864 2865 Except as noted, this content is licensed under <a 2866 href="http://www.apache.org/licenses/LICENSE-2.0">Apache 2.0</a>. 2867 For details and restrictions, see the <a href="../../../../../license.html"> 2868 Content License</a>. 2869 </p> 2870 <p class="dac-footer-build"> 2871 2872 Android Wearable Support r — 2873<script src="../../../../../timestamp.js" type="text/javascript"></script> 2874<script>document.write(BUILD_TIMESTAMP)</script> 2875 2876 </p> 2877 2878 2879 <p class="dac-footer-links"> 2880 <a href="/about/index.html">About Android</a> 2881 <a href="/auto/index.html">Auto</a> 2882 <a href="/tv/index.html">TV</a> 2883 <a href="/wear/index.html">Wear</a> 2884 <a href="/legal.html">Legal</a> 2885 2886 <span id="language" class="locales"> 2887 <select name="language" onchange="changeLangPref(this.value, true)"> 2888 <option value="en" selected="selected">English</option> 2889 <option value="es">Español</option> 2890 <option value="ja">日本語</option> 2891 <option value="ko">한국어</option> 2892 <option value="pt-br">Português Brasileiro</option> 2893 <option value="ru">Русский</option> 2894 <option value="zh-cn">中文(简体)</option> 2895 <option value="zh-tw">中文(繁體)</option> 2896 </select> 2897 </span> 2898 </p> 2899 </div> 2900</div> <!-- end footer --> 2901 2902<div data-modal="newsletter" data-newsletter data-swap class="dac-modal newsletter"> 2903 <div class="dac-modal-container"> 2904 <div class="dac-modal-window"> 2905 <header class="dac-modal-header"> 2906 <button class="dac-modal-header-close" data-modal-toggle><i class="dac-sprite dac-close"></i></button> 2907 <div class="dac-swap" data-swap-container> 2908 <section class="dac-swap-section dac-active dac-down"> 2909 <h2 class="norule dac-modal-header-title">Get the latest Android developer news and tips that will help you find success on Google Play.</h2> 2910 <p class="dac-modal-header-subtitle">* Required Fields</p> 2911 </section> 2912 <section class="dac-swap-section dac-up"> 2913 <h2 class="norule dac-modal-header-title">Hooray!</h2> 2914 </section> 2915 </div> 2916 </header> 2917 <div class="dac-swap" data-swap-container> 2918 <section class="dac-swap-section dac-active dac-left"> 2919 <form action="https://docs.google.com/forms/d/1QgnkzbEJIDu9lMEea0mxqWrXUJu0oBCLD7ar23V0Yys/formResponse" class="dac-form" method="post" target="dac-newsletter-iframe"> 2920 <section class="dac-modal-content"> 2921 <fieldset class="dac-form-fieldset"> 2922 <div class="cols"> 2923 <div class="col-1of2 newsletter-leftCol"> 2924 <div class="dac-form-input-group"> 2925 <label for="newsletter-full-name" class="dac-form-floatlabel">Full name</label> 2926 <input type="text" class="dac-form-input" name="entry.1357890476" id="newsletter-full-name" required> 2927 <span class="dac-form-required">*</span> 2928 </div> 2929 <div class="dac-form-input-group"> 2930 <label for="newsletter-email" class="dac-form-floatlabel">Email address</label> 2931 <input type="email" class="dac-form-input" name="entry.472100832" id="newsletter-email" required> 2932 <span class="dac-form-required">*</span> 2933 </div> 2934 </div> 2935 <div class="col-1of2 newsletter-rightCol"> 2936 <div class="dac-form-input-group"> 2937 <label for="newsletter-company" class="dac-form-floatlabel">Company / developer name</label> 2938 <input type="text" class="dac-form-input" name="entry.1664780309" id="newsletter-company"> 2939 </div> 2940 <div class="dac-form-input-group"> 2941 <label for="newsletter-play-store" class="dac-form-floatlabel">One of your Play Store app URLs</label> 2942 <input type="url" class="dac-form-input" name="entry.47013838" id="newsletter-play-store" required> 2943 <span class="dac-form-required">*</span> 2944 </div> 2945 </div> 2946 </div> 2947 </fieldset> 2948 <fieldset class="dac-form-fieldset"> 2949 <div class="cols"> 2950 <div class="col-1of2 newsletter-leftCol"> 2951 <legend class="dac-form-legend">Which best describes your business:<span class="dac-form-required">*</span> 2952 </legend> 2953 <div class="dac-form-radio-group"> 2954 <input type="radio" value="Apps" class="dac-form-radio" name="entry.1796324055" id="newsletter-business-type-app" required> 2955 <label for="newsletter-business-type-app" class="dac-form-radio-button"></label> 2956 <label for="newsletter-business-type-app" class="dac-form-label">Apps</label> 2957 </div> 2958 <div class="dac-form-radio-group"> 2959 <input type="radio" value="Games" class="dac-form-radio" name="entry.1796324055" id="newsletter-business-type-games" required> 2960 <label for="newsletter-business-type-games" class="dac-form-radio-button"></label> 2961 <label for="newsletter-business-type-games" class="dac-form-label">Games</label> 2962 </div> 2963 <div class="dac-form-radio-group"> 2964 <input type="radio" value="Apps and Games" class="dac-form-radio" name="entry.1796324055" id="newsletter-business-type-appsgames" required> 2965 <label for="newsletter-business-type-appsgames" class="dac-form-radio-button"></label> 2966 <label for="newsletter-business-type-appsgames" class="dac-form-label">Apps & Games</label> 2967 </div> 2968 </div> 2969 <div class="col-1of2 newsletter-rightCol newsletter-checkboxes"> 2970 <div class="dac-form-radio-group"> 2971 <div class="dac-media"> 2972 <div class="dac-media-figure"> 2973 <input type="checkbox" class="dac-form-checkbox" name="entry.732309842" id="newsletter-add" required value="Add me to the mailing list for the monthly newsletter and occasional emails about development and Google Play opportunities."> 2974 <label for="newsletter-add" class="dac-form-checkbox-button"></label> 2975 </div> 2976 <div class="dac-media-body"> 2977 <label for="newsletter-add" class="dac-form-label dac-form-aside">Add me to the mailing list for the monthly newsletter and occasional emails about development and Google Play opportunities.<span class="dac-form-required">*</span></label> 2978 </div> 2979 </div> 2980 </div> 2981 <div class="dac-form-radio-group"> 2982 <div class="dac-media"> 2983 <div class="dac-media-figure"> 2984 <input type="checkbox" class="dac-form-checkbox" name="entry.2045036090" id="newsletter-terms" required value="I acknowledge that the information provided in this form will be subject to Google's privacy policy (https://www.google.com/policies/privacy/)."> 2985 <label for="newsletter-terms" class="dac-form-checkbox-button"></label> 2986 </div> 2987 <div class="dac-media-body"> 2988 <label for="newsletter-terms" class="dac-form-label dac-form-aside">I acknowledge that the information provided in this form will be subject to <a href="https://www.google.com/policies/privacy/">Google's privacy policy</a>.<span class="dac-form-required">*</span></label> 2989 </div> 2990 </div> 2991 </div> 2992 </div> 2993 </div> 2994 </fieldset> 2995 </section> 2996 <footer class="dac-modal-footer"> 2997 <div class="cols"> 2998 <div class="col-2of5"> 2999 </div> 3000 </div> 3001 <button type="submit" value="Submit" class="dac-fab dac-primary dac-large dac-modal-action"><i class="dac-sprite dac-arrow-right"></i></button> 3002 </footer> 3003 </form> 3004 </section> 3005 <section class="dac-swap-section dac-right"> 3006 <div class="dac-modal-content"> 3007 <p class="newsletter-success-message"> 3008 You have successfully signed up for the latest Android developer news and tips. 3009 </p> 3010 </div> 3011 </section> 3012 </div> 3013 </div> 3014 </div> 3015</div> <!-- end footer --> 3016 3017</div><!-- end doc-content --> 3018 3019</div> <!-- end .cols --> 3020</div> <!-- end body-content --> 3021 3022 3023 3024 3025 3026 3027</body> 3028</html> 3029