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