1 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 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119<!DOCTYPE html> 120<html devsite> 121<head> 122 123 124 <meta name="top_category" value="develop" /> 125 126 <meta name="subcategory" value="reference" /> 127 128 129 <meta name="book_path" value="/reference/android/support/wearable/_book.yaml" /> 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145<title>GridViewPager.OnPageChangeListener</title> 146 147 148</head> 149 150<body class="gc-documentation develop reference api apilevel-"> 151<div id="doc-api-level" class="" style="display:none"></div> 152 153 154 155 156<div id="naMessage"></div> 157 158<div id="api-info-block"> 159<div class="api-level"> 160 161 162 163 164</div> 165 166 167 168 169<div class="sum-details-links"> 170 171Summary: 172 173 174 175 176 177 178 179 180 181 182 183 <a href="#pubmethods">Methods</a> 184 185 186 187 188| <a href="#" onclick="return toggleAllClassInherited()" id="toggleAllClassInherited">[Expand All]</a> 189 190</div><!-- end sum-details-links --> 191</div><!-- end api-info-block --> 192 193<div class="api apilevel-" id="jd-content"> 194 195<!-- ======== START OF CLASS DATA ======== --> 196 197<h1 class="api-title">GridViewPager.OnPageChangeListener</h1> 198<p> 199<code class="api-signature"> 200 public 201 static 202 203 204 interface 205 GridViewPager.OnPageChangeListener 206</code> 207<br> 208 209 210<code class="api-signature"> 211 212 213 214</code> 215 216</p><table class="jd-inheritance-table"> 217 218 219 <tr> 220 221 <td colspan="1" class="jd-inheritance-class-cell">android.support.wearable.view.GridViewPager.OnPageChangeListener 222 </td> 223 </tr> 224 225 226</table> 227 228 <table class="jd-sumtable jd-sumtable-subclasses"><tr><td colspan="2" style="border:none;margin:0;padding:0;"> 229 230 <a href="#" onclick="return toggleInherited(this, null)" id="subclasses-indirect" class="jd-expando-trigger closed" 231 ><img height="34" id="subclasses-indirect-trigger" 232 src="/assets/images/styles/disclosure_down.png" 233 class="jd-expando-trigger-img" /></a>Known Indirect Subclasses 234 235 <div id="subclasses-indirect"> 236 <div id="subclasses-indirect-list" 237 class="jd-inheritedlinks" 238 239 > 240 241 242 <a href="/reference/android/support/wearable/view/DotsPageIndicator.html">DotsPageIndicator</a> 243 244 245 </div> 246 <div id="subclasses-indirect-summary" 247 style="display: none;" 248 > 249 250 <table class="jd-sumtable-expando"> 251 252 <tr class="alt-color api apilevel-" > 253 <td class="jd-linkcol"><a href="/reference/android/support/wearable/view/DotsPageIndicator.html">DotsPageIndicator</a></td> 254 <td class="jd-descrcol" width="100%"> 255 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 256 available pages on the current row. 257 258 259 260 </td> 261 </tr> 262 263 264 </table> 265 266 </div> 267 </div> 268 </td></tr></table> 269 270 271 272<br><hr> 273 274 275 <p>Callback interface for responding to changing state of the selected page. 276</p> 277 278 279 280 281 282 283 284<h2 class="api-section">Summary</h2> 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312<!-- ========== METHOD SUMMARY =========== --> 313<table id="pubmethods" class="responsive methods"> 314<tr><th colspan="2"><h3>Public methods</h3></th></tr> 315 316 317 318 319 <tr class="api apilevel-" > 320 321 322 <td><code> 323 abstract 324 325 326 327 328 void</code> 329 </td> 330 331 <td width="100%"> 332 <code> 333 <a href="/reference/android/support/wearable/view/GridViewPager.OnPageChangeListener.html#onPageScrollStateChanged(int)">onPageScrollStateChanged</a>(int state) 334 </code> 335 336 <p>Called when the scroll state changes. 337 338 339</p> 340 341 </td> 342 </tr> 343 344 345 346 <tr class="api apilevel-" > 347 348 349 <td><code> 350 abstract 351 352 353 354 355 void</code> 356 </td> 357 358 <td width="100%"> 359 <code> 360 <a href="/reference/android/support/wearable/view/GridViewPager.OnPageChangeListener.html#onPageScrolled(int, int, float, float, int, int)">onPageScrolled</a>(int row, int column, float rowOffset, float columnOffset, int rowOffsetPixels, int columnOffsetPixels) 361 </code> 362 363 <p>This method will be invoked when the current page is scrolled, either as part of a 364 programmatically initiated smooth scroll or a user initiated touch scroll. 365 366 367</p> 368 369 </td> 370 </tr> 371 372 373 374 <tr class="api apilevel-" > 375 376 377 <td><code> 378 abstract 379 380 381 382 383 void</code> 384 </td> 385 386 <td width="100%"> 387 <code> 388 <a href="/reference/android/support/wearable/view/GridViewPager.OnPageChangeListener.html#onPageSelected(int, int)">onPageSelected</a>(int row, int column) 389 </code> 390 391 <p>This method is called when a new page becomes selected. 392 393 394</p> 395 396 </td> 397 </tr> 398 399 400 401</table> 402 403 404 405 406 407 408 409 410<!-- XML Attributes --> 411 412 413<!-- Enum Values --> 414 415 416<!-- Constants --> 417 418 419<!-- Fields --> 420 421 422<!-- Public ctors --> 423 424 425 426<!-- ========= CONSTRUCTOR DETAIL ======== --> 427<!-- Protected ctors --> 428 429 430 431<!-- ========= METHOD DETAIL ======== --> 432<!-- Public methdos --> 433 434<h2 class="api-section">Public methods</h2> 435 436 437 438<A NAME="onPageScrollStateChanged(int)"></A> 439 440<div class="api apilevel-"> 441 <h3 class="api-name">onPageScrollStateChanged</h3> 442 <div class="api-level"> 443 <div></div> 444 445 446 447 </div> 448<pre class="api-signature no-pretty-print"> 449void onPageScrollStateChanged (int state)</pre> 450 451 452 453 454 <p>Called when the scroll state changes. Useful for discovering when the user begins 455 dragging, when the pager is automatically settling to the current page, or when it is 456 fully stopped/idle.</p> 457 <table class="responsive"> 458 <tr><th colspan=2>Parameters</th></tr> 459 <tr> 460 <td><code>state</code></td> 461 <td width="100%"> 462 <code>int</code>: 463 The new scroll state.</td> 464 </tr> 465 </table> 466 <div> 467 <p><b>See also:</b></p> 468 <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> 469 </ul> 470 </div> 471 472</div> 473 474 475<A NAME="onPageScrolled(int, int, float, float, int, int)"></A> 476 477<div class="api apilevel-"> 478 <h3 class="api-name">onPageScrolled</h3> 479 <div class="api-level"> 480 <div></div> 481 482 483 484 </div> 485<pre class="api-signature no-pretty-print"> 486void onPageScrolled (int row, 487 int column, 488 float rowOffset, 489 float columnOffset, 490 int rowOffsetPixels, 491 int columnOffsetPixels)</pre> 492 493 494 495 496 <p>This method will be invoked when the current page is scrolled, either as part of a 497 programmatically initiated smooth scroll or a user initiated touch scroll.</p> 498 <table class="responsive"> 499 <tr><th colspan=2>Parameters</th></tr> 500 <tr> 501 <td><code>row</code></td> 502 <td width="100%"> 503 <code>int</code>: 504 Vertical position index of the new selected page row position+1 will be 505 visible if positionOffset is nonzero</td> 506 </tr> 507 <tr> 508 <td><code>column</code></td> 509 <td width="100%"> 510 <code>int</code>: 511 Horizontal position index of the new selected page</td> 512 </tr> 513 <tr> 514 <td><code>rowOffset</code></td> 515 <td width="100%"> 516 <code>float</code>: 517 Value from [0, 1) indicating the offset from the row</td> 518 </tr> 519 <tr> 520 <td><code>columnOffset</code></td> 521 <td width="100%"> 522 <code>float</code>: 523 Value from [0, 1) indicating the offset from the column</td> 524 </tr> 525 <tr> 526 <td><code>rowOffsetPixels</code></td> 527 <td width="100%"> 528 <code>int</code>: 529 Value in pixels indicating the offset from row</td> 530 </tr> 531 <tr> 532 <td><code>columnOffsetPixels</code></td> 533 <td width="100%"> 534 <code>int</code>: 535 Value in pixels indicating the offset from column 536</td> 537 </tr> 538 </table> 539 540</div> 541 542 543<A NAME="onPageSelected(int, int)"></A> 544 545<div class="api apilevel-"> 546 <h3 class="api-name">onPageSelected</h3> 547 <div class="api-level"> 548 <div></div> 549 550 551 552 </div> 553<pre class="api-signature no-pretty-print"> 554void onPageSelected (int row, 555 int column)</pre> 556 557 558 559 560 <p>This method is called when a new page becomes selected. The page may still be settling 561 into final position.</p> 562 <table class="responsive"> 563 <tr><th colspan=2>Parameters</th></tr> 564 <tr> 565 <td><code>row</code></td> 566 <td width="100%"> 567 <code>int</code>: 568 Vertical position index of the new selected page</td> 569 </tr> 570 <tr> 571 <td><code>column</code></td> 572 <td width="100%"> 573 <code>int</code>: 574 Horizontal position index of the new selected page 575</td> 576 </tr> 577 </table> 578 579</div> 580 581 582 583 584 585<!-- ========= METHOD DETAIL ======== --> 586 587 588 589<!-- ========= END OF CLASS DATA ========= --> 590 591</div><!-- end jd-content --> 592 593 594 595<div class="data-reference-resources-wrapper"> 596 597 <ul data-reference-resources> 598 599 600 <li><h2>Interfaces</h2> 601 <ul> 602 <li class="api apilevel-"><a href="/reference/android/support/wearable/view/ActionChooserView.ActionChooserListener.html">ActionChooserView.ActionChooserListener</a></li> 603 <li class="api apilevel-"><a href="/reference/android/support/wearable/view/DelayedConfirmationView.DelayedConfirmationListener.html">DelayedConfirmationView.DelayedConfirmationListener</a></li> 604 <li class="api apilevel-"><a href="/reference/android/support/wearable/view/GridPageOptions.html">GridPageOptions</a></li> 605 <li class="api apilevel-"><a href="/reference/android/support/wearable/view/GridPageOptions.BackgroundListener.html">GridPageOptions.BackgroundListener</a></li> 606 <li class="api apilevel-"><a href="/reference/android/support/wearable/view/GridViewPager.OnAdapterChangeListener.html">GridViewPager.OnAdapterChangeListener</a></li> 607 <li class="selected api apilevel-"><a href="/reference/android/support/wearable/view/GridViewPager.OnPageChangeListener.html">GridViewPager.OnPageChangeListener</a></li> 608 <li class="api apilevel-"><a href="/reference/android/support/wearable/view/WatchViewStub.OnLayoutInflatedListener.html">WatchViewStub.OnLayoutInflatedListener</a></li> 609 <li class="api apilevel-"><a href="/reference/android/support/wearable/view/WearableListView.ClickListener.html">WearableListView.ClickListener</a></li> 610 <li class="api apilevel-"><a href="/reference/android/support/wearable/view/WearableListView.OnCenterProximityListener.html">WearableListView.OnCenterProximityListener</a></li> 611 <li class="api apilevel-"><a href="/reference/android/support/wearable/view/WearableListView.OnCentralPositionChangedListener.html">WearableListView.OnCentralPositionChangedListener</a></li> 612 <li class="api apilevel-"><a href="/reference/android/support/wearable/view/WearableListView.OnScrollListener.html">WearableListView.OnScrollListener</a></li> 613 </ul> 614 </li> 615 616 <li><h2>Classes</h2> 617 <ul> 618 <li class="api apilevel-"><a href="/reference/android/support/wearable/view/ActionChooserView.html">ActionChooserView</a></li> 619 <li class="api apilevel-"><a href="/reference/android/support/wearable/view/ActionLabel.html">ActionLabel</a></li> 620 <li class="api apilevel-"><a href="/reference/android/support/wearable/view/ActionPage.html">ActionPage</a></li> 621 <li class="api apilevel-"><a href="/reference/android/support/wearable/view/BoxInsetLayout.html">BoxInsetLayout</a></li> 622 <li class="api apilevel-"><a href="/reference/android/support/wearable/view/BoxInsetLayout.LayoutParams.html">BoxInsetLayout.LayoutParams</a></li> 623 <li class="api apilevel-"><a href="/reference/android/support/wearable/view/CardFragment.html">CardFragment</a></li> 624 <li class="api apilevel-"><a href="/reference/android/support/wearable/view/CardFrame.html">CardFrame</a></li> 625 <li class="api apilevel-"><a href="/reference/android/support/wearable/view/CardScrollView.html">CardScrollView</a></li> 626 <li class="api apilevel-"><a href="/reference/android/support/wearable/view/CircledImageView.html">CircledImageView</a></li> 627 <li class="api apilevel-"><a href="/reference/android/support/wearable/view/CircularButton.html">CircularButton</a></li> 628 <li class="api apilevel-"><a href="/reference/android/support/wearable/view/CrossfadeDrawable.html">CrossfadeDrawable</a></li> 629 <li class="api apilevel-"><a href="/reference/android/support/wearable/view/DelayedConfirmationView.html">DelayedConfirmationView</a></li> 630 <li class="api apilevel-"><a href="/reference/android/support/wearable/view/DismissOverlayView.html">DismissOverlayView</a></li> 631 <li class="api apilevel-"><a href="/reference/android/support/wearable/view/DotsPageIndicator.html">DotsPageIndicator</a></li> 632 <li class="api apilevel-"><a href="/reference/android/support/wearable/view/FragmentGridPagerAdapter.html">FragmentGridPagerAdapter</a></li> 633 <li class="api apilevel-"><a href="/reference/android/support/wearable/view/GridPagerAdapter.html">GridPagerAdapter</a></li> 634 <li class="api apilevel-"><a href="/reference/android/support/wearable/view/GridViewPager.html">GridViewPager</a></li> 635 <li class="api apilevel-"><a href="/reference/android/support/wearable/view/GridViewPager.LayoutParams.html">GridViewPager.LayoutParams</a></li> 636 <li class="api apilevel-"><a href="/reference/android/support/wearable/view/ProgressSpinner.html">ProgressSpinner</a></li> 637 <li class="api apilevel-"><a href="/reference/android/support/wearable/view/SimpleAnimatorListener.html">SimpleAnimatorListener</a></li> 638 <li class="api apilevel-"><a href="/reference/android/support/wearable/view/WatchViewStub.html">WatchViewStub</a></li> 639 <li class="api apilevel-"><a href="/reference/android/support/wearable/view/WearableFrameLayout.html">WearableFrameLayout</a></li> 640 <li class="api apilevel-"><a href="/reference/android/support/wearable/view/WearableFrameLayout.LayoutParams.html">WearableFrameLayout.LayoutParams</a></li> 641 <li class="api apilevel-"><a href="/reference/android/support/wearable/view/WearableListView.html">WearableListView</a></li> 642 <li class="api apilevel-"><a href="/reference/android/support/wearable/view/WearableListView.Adapter.html">WearableListView.Adapter</a></li> 643 <li class="api apilevel-"><a href="/reference/android/support/wearable/view/WearableListView.ViewHolder.html">WearableListView.ViewHolder</a></li> 644 </ul> 645 </li> 646 647 648 649 </ul> 650 651</div> 652 653 654 655</body> 656</html> 657