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>GridPagerAdapter</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
170
171
172
173
174
175
176<div class="sum-details-links">
177
178Summary:
179
180
181
182
183
184  <a href="#constants">Constants</a>
185
186
187
188
189  &#124; <a href="#lfields">Fields</a>
190
191
192
193
194  &#124; <a href="#pubctors">Ctors</a>
195
196
197
198
199  &#124; <a href="#pubmethods">Methods</a>
200
201
202
203  &#124; <a href="#promethods">Protected Methods</a>
204
205
206
207  &#124; <a href="#inhmethods">Inherited Methods</a>
208
209&#124; <a href="#" onclick="return toggleAllClassInherited()" id="toggleAllClassInherited">[Expand All]</a>
210
211</div><!-- end sum-details-links -->
212</div><!-- end api-info-block -->
213
214<div class="api apilevel-" id="jd-content">
215
216<!-- ======== START OF CLASS DATA ======== -->
217
218<h1 class="api-title">GridPagerAdapter</h1>
219<p>
220<code class="api-signature">
221  public
222
223
224  abstract
225  class
226  GridPagerAdapter
227</code>
228<br>
229
230
231<code class="api-signature">
232
233    extends Object
234
235
236
237</code>
238
239<code class="api-signature">
240
241
242
243</code>
244
245</p><table class="jd-inheritance-table">
246
247
248  <tr>
249
250    <td colspan="2" class="jd-inheritance-class-cell">java.lang.Object
251    </td>
252  </tr>
253
254
255  <tr>
256
257      <td class="jd-inheritance-space">&nbsp;&nbsp;&nbsp;&#x21b3;</td>
258
259    <td colspan="1" class="jd-inheritance-class-cell">android.support.wearable.view.GridPagerAdapter
260    </td>
261  </tr>
262
263
264</table>
265  <table class="jd-sumtable jd-sumtable-subclasses">
266  <tr><td style="border:none;margin:0;padding:0;">
267
268  <a href="#" onclick="return toggleInherited(this, null)" id="subclasses-direct" class="jd-expando-trigger closed"
269          ><img height="34" id="subclasses-direct-trigger"
270          src="/assets/images/styles/disclosure_down.png"
271          class="jd-expando-trigger-img" /></a>Known Direct Subclasses
272
273  <div id="subclasses-direct">
274      <div id="subclasses-direct-list"
275              class="jd-inheritedlinks"
276
277              >
278
279
280              <a href="/reference/android/support/wearable/view/FragmentGridPagerAdapter.html">FragmentGridPagerAdapter</a>
281
282
283      </div>
284      <div id="subclasses-direct-summary"
285              style="display: none;"
286              >
287
288  <table class="jd-sumtable-expando">
289
290      <tr class="alt-color api apilevel-" >
291        <td class="jd-linkcol"><a href="/reference/android/support/wearable/view/FragmentGridPagerAdapter.html">FragmentGridPagerAdapter</a></td>
292        <td class="jd-descrcol" width="100%">
293          An implementation of GridPagerAdapter which represents each page as a <code><a href="/reference/android/app/Fragment.html">Fragment</a></code>.&nbsp;
294
295
296
297        </td>
298      </tr>
299
300
301  </table>
302
303      </div>
304  </div>
305  </td></tr>
306  </table>
307
308
309
310
311
312<br><hr>
313
314
315  <p>This component is responsible for providing views requested by a <code><a href="/reference/android/support/wearable/view/GridViewPager.html">GridViewPager</a></code>.
316 <p>
317 Content is organized into rows and columns of pages, where each page is represented by a View.
318 Each row may contain a different number of columns.
319 <p>
320 In addition to content views, this adapter is also queried for backgrounds to be displayed for
321 each page. When the same background spans multiple pages, it's automatically zoomed and panned to
322 create a parallax effect against the movement of the page content as it moves. By default, no
323 background is provided.
324</p>
325
326
327
328
329
330
331
332<h2 class="api-section">Summary</h2>
333
334
335
336
337
338
339
340
341
342
343
344
345
346<!-- =========== ENUM CONSTANT SUMMARY =========== -->
347<table id="constants" class="responsive constants">
348<tr><th colspan="2"><h3>Constants</h3></th></tr>
349
350
351
352    <tr class="api apilevel-" >
353        <td><code>int</code></td>
354        <td width="100%">
355          <code><a href="/reference/android/support/wearable/view/GridPagerAdapter.html#OPTION_DISABLE_PARALLAX">OPTION_DISABLE_PARALLAX</a></code>
356          <p>Disables zooming and parallax scrolling of the background.
357
358
359</p>
360        </td>
361    </tr>
362
363
364    <tr class="api apilevel-" >
365        <td><code>int</code></td>
366        <td width="100%">
367          <code><a href="/reference/android/support/wearable/view/GridPagerAdapter.html#PAGE_DEFAULT_OPTIONS">PAGE_DEFAULT_OPTIONS</a></code>
368          <p>Default background options.
369
370
371</p>
372        </td>
373    </tr>
374
375
376
377</table>
378
379
380
381
382
383
384
385<!-- =========== FIELD SUMMARY =========== -->
386<table id="lfields" class="responsive properties">
387<tr><th colspan="2"><h3>Fields</h3></th></tr>
388
389
390
391  <tr class="api apilevel-" >
392    <td><code>
393    public
394    static
395    final
396    Drawable</code></td>
397    <td width="100%">
398      <code><a href="/reference/android/support/wearable/view/GridPagerAdapter.html#BACKGROUND_NONE">BACKGROUND_NONE</a></code>
399      <p>This value indicates that no background should drawn.
400
401
402</p>
403    </td>
404  </tr>
405
406
407  <tr class="api apilevel-" >
408    <td><code>
409    public
410    static
411    final
412    Point</code></td>
413    <td width="100%">
414      <code><a href="/reference/android/support/wearable/view/GridPagerAdapter.html#POSITION_NONE">POSITION_NONE</a></code>
415      <p>
416
417
418</p>
419    </td>
420  </tr>
421
422
423  <tr class="api apilevel-" >
424    <td><code>
425    public
426    static
427    final
428    Point</code></td>
429    <td width="100%">
430      <code><a href="/reference/android/support/wearable/view/GridPagerAdapter.html#POSITION_UNCHANGED">POSITION_UNCHANGED</a></code>
431      <p>
432
433
434</p>
435    </td>
436  </tr>
437
438
439
440</table>
441
442
443
444
445
446
447
448<!-- ======== CONSTRUCTOR SUMMARY ======== -->
449<table id="pubctors" class="responsive constructors">
450<tr><th colspan="2"><h3>Public constructors</h3></th></tr>
451
452
453
454
455  <tr class="api apilevel-" >
456
457
458    <td width="100%">
459      <code>
460      <a href="/reference/android/support/wearable/view/GridPagerAdapter.html#GridPagerAdapter()">GridPagerAdapter</a>()
461      </code>
462
463    </td>
464  </tr>
465
466
467
468</table>
469
470
471
472
473
474
475<!-- ========== METHOD SUMMARY =========== -->
476<table id="pubmethods" class="responsive methods">
477<tr><th colspan="2"><h3>Public methods</h3></th></tr>
478
479
480
481
482  <tr class="api apilevel-" >
483
484
485    <td><code>
486        abstract
487
488
489
490
491        void</code>
492    </td>
493
494    <td width="100%">
495      <code>
496      <a href="/reference/android/support/wearable/view/GridPagerAdapter.html#destroyItem(android.view.ViewGroup, int, int, java.lang.Object)">destroyItem</a>(ViewGroup container, int row, int column, Object object)
497      </code>
498
499        <p>Removes a page for the given position.
500
501
502</p>
503
504    </td>
505  </tr>
506
507
508
509  <tr class="api apilevel-" >
510
511
512    <td><code>
513
514
515
516
517
518        void</code>
519    </td>
520
521    <td width="100%">
522      <code>
523      <a href="/reference/android/support/wearable/view/GridPagerAdapter.html#finishUpdate(android.view.ViewGroup)">finishUpdate</a>(ViewGroup container)
524      </code>
525
526        <p>Called when the a change in the shown pages has been completed.
527
528
529</p>
530
531    </td>
532  </tr>
533
534
535
536  <tr class="api apilevel-" >
537
538
539    <td><code>
540
541
542
543
544
545        Drawable</code>
546    </td>
547
548    <td width="100%">
549      <code>
550      <a href="/reference/android/support/wearable/view/GridPagerAdapter.html#getBackgroundForPage(int, int)">getBackgroundForPage</a>(int row, int column)
551      </code>
552
553        <p>Provides content to be displayed as background for a specific page.
554
555
556</p>
557
558    </td>
559  </tr>
560
561
562
563  <tr class="api apilevel-" >
564
565
566    <td><code>
567
568
569
570
571
572        Drawable</code>
573    </td>
574
575    <td width="100%">
576      <code>
577      <a href="/reference/android/support/wearable/view/GridPagerAdapter.html#getBackgroundForRow(int)">getBackgroundForRow</a>(int row)
578      </code>
579
580        <p>Provides content to be displayed as the default background for all pages on the given row.
581
582
583</p>
584
585    </td>
586  </tr>
587
588
589
590  <tr class="api apilevel-" >
591
592
593    <td><code>
594        abstract
595
596
597
598
599        int</code>
600    </td>
601
602    <td width="100%">
603      <code>
604      <a href="/reference/android/support/wearable/view/GridPagerAdapter.html#getColumnCount(int)">getColumnCount</a>(int row)
605      </code>
606
607        <p>Returns the maximum number of columns for each row.
608
609
610</p>
611
612    </td>
613  </tr>
614
615
616
617  <tr class="api apilevel-" >
618
619
620    <td><code>
621
622
623
624
625
626        int</code>
627    </td>
628
629    <td width="100%">
630      <code>
631      <a href="/reference/android/support/wearable/view/GridPagerAdapter.html#getCurrentColumnForRow(int, int)">getCurrentColumnForRow</a>(int row, int currentColumn)
632      </code>
633
634        <p>Returns the column to arrive at when navigating vertically to the specified row.
635
636
637</p>
638
639    </td>
640  </tr>
641
642
643
644  <tr class="api apilevel-" >
645
646
647    <td><code>
648
649
650
651
652
653        Point</code>
654    </td>
655
656    <td width="100%">
657      <code>
658      <a href="/reference/android/support/wearable/view/GridPagerAdapter.html#getItemPosition(java.lang.Object)">getItemPosition</a>(Object object)
659      </code>
660
661        <p>Called when the host view is attempting to determine if an item's position has changed.
662
663
664</p>
665
666    </td>
667  </tr>
668
669
670
671  <tr class="api apilevel-" >
672
673
674    <td><code>
675
676
677
678
679
680        int</code>
681    </td>
682
683    <td width="100%">
684      <code>
685      <a href="/reference/android/support/wearable/view/GridPagerAdapter.html#getOptionsForPage(int, int)">getOptionsForPage</a>(int row, int column)
686      </code>
687
688        <p>Provides a set of features to apply to a page background.
689
690
691</p>
692
693    </td>
694  </tr>
695
696
697
698  <tr class="api apilevel-" >
699
700
701    <td><code>
702        abstract
703
704
705
706
707        int</code>
708    </td>
709
710    <td width="100%">
711      <code>
712      <a href="/reference/android/support/wearable/view/GridPagerAdapter.html#getRowCount()">getRowCount</a>()
713      </code>
714
715        <p>Returns the number of rows available.
716
717
718</p>
719
720    </td>
721  </tr>
722
723
724
725  <tr class="api apilevel-" >
726
727
728    <td><code>
729        abstract
730
731
732
733
734        Object</code>
735    </td>
736
737    <td width="100%">
738      <code>
739      <a href="/reference/android/support/wearable/view/GridPagerAdapter.html#instantiateItem(android.view.ViewGroup, int, int)">instantiateItem</a>(ViewGroup container, int row, int column)
740      </code>
741
742        <p>Creates the page for the given position.
743
744
745</p>
746
747    </td>
748  </tr>
749
750
751
752  <tr class="api apilevel-" >
753
754
755    <td><code>
756        abstract
757
758
759
760
761        boolean</code>
762    </td>
763
764    <td width="100%">
765      <code>
766      <a href="/reference/android/support/wearable/view/GridPagerAdapter.html#isViewFromObject(android.view.View, java.lang.Object)">isViewFromObject</a>(View view, Object object)
767      </code>
768
769        <p>Determines whether a page View is associated with a specific key object as returned by
770 <code><a href="/reference/android/support/wearable/view/GridPagerAdapter.html#instantiateItem(android.view.ViewGroup, int, int)">instantiateItem(ViewGroup, int, int)</a></code>.
771
772
773</p>
774
775    </td>
776  </tr>
777
778
779
780  <tr class="api apilevel-" >
781
782
783    <td><code>
784
785
786
787
788
789        void</code>
790    </td>
791
792    <td width="100%">
793      <code>
794      <a href="/reference/android/support/wearable/view/GridPagerAdapter.html#notifyDataSetChanged()">notifyDataSetChanged</a>()
795      </code>
796
797        <p>This method should be called by the application if the data backing this adapter has changed
798 and associated views should update.
799
800
801</p>
802
803    </td>
804  </tr>
805
806
807
808  <tr class="api apilevel-" >
809
810
811    <td><code>
812
813
814
815
816
817        void</code>
818    </td>
819
820    <td width="100%">
821      <code>
822      <a href="/reference/android/support/wearable/view/GridPagerAdapter.html#notifyPageBackgroundChanged(int, int)">notifyPageBackgroundChanged</a>(int row, int column)
823      </code>
824
825        <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>
826 or options returned by <code><a href="/reference/android/support/wearable/view/GridPagerAdapter.html#getOptionsForPage(int, int)">getOptionsForPage(int, int)</a></code> change.
827
828
829</p>
830
831    </td>
832  </tr>
833
834
835
836  <tr class="api apilevel-" >
837
838
839    <td><code>
840
841
842
843
844
845        void</code>
846    </td>
847
848    <td width="100%">
849      <code>
850      <a href="/reference/android/support/wearable/view/GridPagerAdapter.html#notifyRowBackgroundChanged(int)">notifyRowBackgroundChanged</a>(int row)
851      </code>
852
853        <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>
854 changes.
855
856
857</p>
858
859    </td>
860  </tr>
861
862
863
864  <tr class="api apilevel-" >
865
866
867    <td><code>
868
869
870
871
872
873        void</code>
874    </td>
875
876    <td width="100%">
877      <code>
878      <a href="/reference/android/support/wearable/view/GridPagerAdapter.html#registerDataSetObserver(android.database.DataSetObserver)">registerDataSetObserver</a>(DataSetObserver observer)
879      </code>
880
881        <p>Register an observer to receive callbacks related to the adapter's data changing.
882
883
884</p>
885
886    </td>
887  </tr>
888
889
890
891  <tr class="api apilevel-" >
892
893
894    <td><code>
895
896
897
898
899
900        void</code>
901    </td>
902
903    <td width="100%">
904      <code>
905      <a href="/reference/android/support/wearable/view/GridPagerAdapter.html#restoreState(android.os.Parcelable, java.lang.ClassLoader)">restoreState</a>(Parcelable savedState, ClassLoader classLoader)
906      </code>
907
908        <p>Restores the previously saved state of this adapter.
909
910
911</p>
912
913    </td>
914  </tr>
915
916
917
918  <tr class="api apilevel-" >
919
920
921    <td><code>
922
923
924
925
926
927        Parcelable</code>
928    </td>
929
930    <td width="100%">
931      <code>
932      <a href="/reference/android/support/wearable/view/GridPagerAdapter.html#saveState()">saveState</a>()
933      </code>
934
935        <p>Saves the current state of this adapter.
936
937
938</p>
939
940    </td>
941  </tr>
942
943
944
945  <tr class="api apilevel-" >
946
947
948    <td><code>
949
950
951
952
953
954        void</code>
955    </td>
956
957    <td width="100%">
958      <code>
959      <a href="/reference/android/support/wearable/view/GridPagerAdapter.html#setCurrentColumnForRow(int, int)">setCurrentColumnForRow</a>(int row, int currentColumn)
960      </code>
961
962        <p>Called to inform the adapter of which column is now current for the given row.
963
964
965</p>
966
967    </td>
968  </tr>
969
970
971
972  <tr class="api apilevel-" >
973
974
975    <td><code>
976
977
978
979
980
981        void</code>
982    </td>
983
984    <td width="100%">
985      <code>
986      <a href="/reference/android/support/wearable/view/GridPagerAdapter.html#startUpdate(android.view.ViewGroup)">startUpdate</a>(ViewGroup container)
987      </code>
988
989        <p>Called when a change in the shown pages is going to start being made.
990
991
992</p>
993
994    </td>
995  </tr>
996
997
998
999  <tr class="api apilevel-" >
1000
1001
1002    <td><code>
1003
1004
1005
1006
1007
1008        void</code>
1009    </td>
1010
1011    <td width="100%">
1012      <code>
1013      <a href="/reference/android/support/wearable/view/GridPagerAdapter.html#unregisterDataSetObserver(android.database.DataSetObserver)">unregisterDataSetObserver</a>(DataSetObserver observer)
1014      </code>
1015
1016        <p>Unregister an observer from callbacks related to the adapter's data changing.
1017
1018
1019</p>
1020
1021    </td>
1022  </tr>
1023
1024
1025
1026</table>
1027
1028
1029
1030
1031<!-- ========== METHOD SUMMARY =========== -->
1032<table id="promethods" class="reponsive methods">
1033<tr><th colspan="2"><h3>Protected methods</h3></th></tr>
1034
1035
1036
1037
1038  <tr class="api apilevel-" >
1039
1040
1041    <td><code>
1042
1043
1044
1045
1046
1047        void</code>
1048    </td>
1049
1050    <td width="100%">
1051      <code>
1052      <a href="/reference/android/support/wearable/view/GridPagerAdapter.html#applyItemPosition(java.lang.Object, android.graphics.Point)">applyItemPosition</a>(Object object, Point position)
1053      </code>
1054
1055        <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
1056 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>.
1057
1058
1059</p>
1060
1061    </td>
1062  </tr>
1063
1064
1065
1066</table>
1067
1068
1069
1070
1071
1072<!-- ========== METHOD SUMMARY =========== -->
1073<table id="inhmethods" class="methods inhtable">
1074<tr><th><h3>Inherited methods</h3></th></tr>
1075
1076
1077<tr class="api apilevel-" >
1078<td colspan="2">
1079
1080  <a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-java.lang.Object" class="jd-expando-trigger closed"
1081          ><img height="34" id="inherited-methods-java.lang.Object-trigger"
1082          src="/assets/images/styles/disclosure_down.png"
1083          class="jd-expando-trigger-img" /></a>From
1084class
1085<code>
1086
1087    java.lang.Object
1088
1089</code>
1090<div id="inherited-methods-java.lang.Object">
1091  <div id="inherited-methods-java.lang.Object-list"
1092        class="jd-inheritedlinks">
1093  </div>
1094  <div id="inherited-methods-java.lang.Object-summary" style="display: none;">
1095    <table class="jd-sumtable-expando responsive">
1096
1097
1098
1099
1100  <tr class="api apilevel-" >
1101
1102
1103    <td><code>
1104
1105
1106
1107
1108
1109        Object</code>
1110    </td>
1111
1112    <td width="100%">
1113      <code>
1114      clone()
1115      </code>
1116
1117    </td>
1118  </tr>
1119
1120
1121
1122  <tr class="api apilevel-" >
1123
1124
1125    <td><code>
1126
1127
1128
1129
1130
1131        boolean</code>
1132    </td>
1133
1134    <td width="100%">
1135      <code>
1136      equals(Object arg0)
1137      </code>
1138
1139    </td>
1140  </tr>
1141
1142
1143
1144  <tr class="api apilevel-" >
1145
1146
1147    <td><code>
1148
1149
1150
1151
1152
1153        void</code>
1154    </td>
1155
1156    <td width="100%">
1157      <code>
1158      finalize()
1159      </code>
1160
1161    </td>
1162  </tr>
1163
1164
1165
1166  <tr class="api apilevel-" >
1167
1168
1169    <td><code>
1170
1171
1172
1173        final
1174
1175        Class&lt;?&gt;</code>
1176    </td>
1177
1178    <td width="100%">
1179      <code>
1180      getClass()
1181      </code>
1182
1183    </td>
1184  </tr>
1185
1186
1187
1188  <tr class="api apilevel-" >
1189
1190
1191    <td><code>
1192
1193
1194
1195
1196
1197        int</code>
1198    </td>
1199
1200    <td width="100%">
1201      <code>
1202      hashCode()
1203      </code>
1204
1205    </td>
1206  </tr>
1207
1208
1209
1210  <tr class="api apilevel-" >
1211
1212
1213    <td><code>
1214
1215
1216
1217        final
1218
1219        void</code>
1220    </td>
1221
1222    <td width="100%">
1223      <code>
1224      notify()
1225      </code>
1226
1227    </td>
1228  </tr>
1229
1230
1231
1232  <tr class="api apilevel-" >
1233
1234
1235    <td><code>
1236
1237
1238
1239        final
1240
1241        void</code>
1242    </td>
1243
1244    <td width="100%">
1245      <code>
1246      notifyAll()
1247      </code>
1248
1249    </td>
1250  </tr>
1251
1252
1253
1254  <tr class="api apilevel-" >
1255
1256
1257    <td><code>
1258
1259
1260
1261
1262
1263        String</code>
1264    </td>
1265
1266    <td width="100%">
1267      <code>
1268      toString()
1269      </code>
1270
1271    </td>
1272  </tr>
1273
1274
1275
1276  <tr class="api apilevel-" >
1277
1278
1279    <td><code>
1280
1281
1282
1283        final
1284
1285        void</code>
1286    </td>
1287
1288    <td width="100%">
1289      <code>
1290      wait(long arg0, int arg1)
1291      </code>
1292
1293    </td>
1294  </tr>
1295
1296
1297
1298  <tr class="api apilevel-" >
1299
1300
1301    <td><code>
1302
1303
1304
1305        final
1306
1307        void</code>
1308    </td>
1309
1310    <td width="100%">
1311      <code>
1312      wait(long arg0)
1313      </code>
1314
1315    </td>
1316  </tr>
1317
1318
1319
1320  <tr class="api apilevel-" >
1321
1322
1323    <td><code>
1324
1325
1326
1327        final
1328
1329        void</code>
1330    </td>
1331
1332    <td width="100%">
1333      <code>
1334      wait()
1335      </code>
1336
1337    </td>
1338  </tr>
1339
1340
1341
1342    </table>
1343  </div>
1344</div>
1345</td></tr>
1346
1347
1348</table>
1349
1350
1351
1352<!-- XML Attributes -->
1353
1354
1355<!-- Enum Values -->
1356
1357
1358<!-- Constants -->
1359
1360
1361<!-- ========= ENUM CONSTANTS DETAIL ======== -->
1362<h2 class="api-section">Constants</h2>
1363
1364
1365
1366
1367<A NAME="OPTION_DISABLE_PARALLAX"></A>
1368
1369<div class="api apilevel-">
1370    <h3 class="api-name">OPTION_DISABLE_PARALLAX</h3>
1371    <div class="api-level">
1372
1373
1374
1375
1376    </div>
1377<pre class="api-signature no-pretty-print">
1378int OPTION_DISABLE_PARALLAX</pre>
1379
1380
1381
1382
1383  <p>Disables zooming and parallax scrolling of the background.
1384</p>
1385
1386
1387      <p>Constant Value:
1388
1389          1
1390          (0x00000001)
1391
1392
1393</div>
1394
1395
1396
1397<A NAME="PAGE_DEFAULT_OPTIONS"></A>
1398
1399<div class="api apilevel-">
1400    <h3 class="api-name">PAGE_DEFAULT_OPTIONS</h3>
1401    <div class="api-level">
1402
1403
1404
1405
1406    </div>
1407<pre class="api-signature no-pretty-print">
1408int PAGE_DEFAULT_OPTIONS</pre>
1409
1410
1411
1412
1413  <p>Default background options. Parallax scrolling is enabled.
1414</p>
1415
1416
1417      <p>Constant Value:
1418
1419          0
1420          (0x00000000)
1421
1422
1423</div>
1424
1425
1426
1427
1428<!-- Fields -->
1429
1430
1431<!-- ========= FIELD DETAIL ======== -->
1432<h2 class="api-section">Fields</h2>
1433
1434
1435
1436
1437<A NAME="BACKGROUND_NONE"></A>
1438
1439<div class="api apilevel-">
1440    <h3 class="api-name">BACKGROUND_NONE</h3>
1441    <div class="api-level">
1442
1443
1444
1445
1446    </div>
1447<pre class="api-signature no-pretty-print">
1448Drawable BACKGROUND_NONE</pre>
1449
1450
1451
1452
1453  <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
1454 <code><a href="/reference/android/support/wearable/view/GridPagerAdapter.html#getBackgroundForPage(int, int)">getBackgroundForPage(int, int)</a></code> for specific effects.
1455</p>
1456
1457
1458</div>
1459
1460
1461
1462<A NAME="POSITION_NONE"></A>
1463
1464<div class="api apilevel-">
1465    <h3 class="api-name">POSITION_NONE</h3>
1466    <div class="api-level">
1467
1468
1469
1470
1471    </div>
1472<pre class="api-signature no-pretty-print">
1473Point POSITION_NONE</pre>
1474
1475
1476
1477
1478  <p></p>
1479
1480
1481</div>
1482
1483
1484
1485<A NAME="POSITION_UNCHANGED"></A>
1486
1487<div class="api apilevel-">
1488    <h3 class="api-name">POSITION_UNCHANGED</h3>
1489    <div class="api-level">
1490
1491
1492
1493
1494    </div>
1495<pre class="api-signature no-pretty-print">
1496Point POSITION_UNCHANGED</pre>
1497
1498
1499
1500
1501  <p></p>
1502
1503
1504</div>
1505
1506
1507
1508
1509<!-- Public ctors -->
1510
1511
1512<!-- ========= CONSTRUCTOR DETAIL ======== -->
1513<h2 class="api-section">Public constructors</h2>
1514
1515
1516
1517<A NAME="GridPagerAdapter()"></A>
1518
1519<div class="api apilevel-">
1520    <h3 class="api-name">GridPagerAdapter</h3>
1521    <div class="api-level">
1522      <div></div>
1523
1524
1525
1526    </div>
1527<pre class="api-signature no-pretty-print">
1528GridPagerAdapter ()</pre>
1529
1530
1531
1532
1533  <p></p>
1534
1535</div>
1536
1537
1538
1539
1540
1541<!-- ========= CONSTRUCTOR DETAIL ======== -->
1542<!-- Protected ctors -->
1543
1544
1545
1546<!-- ========= METHOD DETAIL ======== -->
1547<!-- Public methdos -->
1548
1549<h2 class="api-section">Public methods</h2>
1550
1551
1552
1553<A NAME="destroyItem(android.view.ViewGroup, int, int, java.lang.Object)"></A>
1554
1555<div class="api apilevel-">
1556    <h3 class="api-name">destroyItem</h3>
1557    <div class="api-level">
1558      <div></div>
1559
1560
1561
1562    </div>
1563<pre class="api-signature no-pretty-print">
1564void destroyItem (ViewGroup container,
1565                int row,
1566                int column,
1567                Object object)</pre>
1568
1569
1570
1571
1572  <p>Removes a page for the given position. The adapter is responsible for removing the view from
1573 its container, although it only must ensure this is done by the time it returns from
1574 <code><a href="/reference/android/support/wearable/view/GridPagerAdapter.html#finishUpdate(android.view.ViewGroup)">finishUpdate(ViewGroup)</a></code>.</p>
1575    <table class="responsive">
1576    <tr><th colspan=2>Parameters</th></tr>
1577      <tr>
1578        <td><code>container</code></td>
1579        <td width="100%">
1580          <code>ViewGroup</code>:
1581          The containing View from which the page will be removed.</td>
1582      </tr>
1583      <tr>
1584        <td><code>row</code></td>
1585        <td width="100%">
1586          <code>int</code>:
1587          the row to be destroyed</td>
1588      </tr>
1589      <tr>
1590        <td><code>column</code></td>
1591        <td width="100%">
1592          <code>int</code>:
1593          the column within the row to be destroyed</td>
1594      </tr>
1595      <tr>
1596        <td><code>object</code></td>
1597        <td width="100%">
1598          <code>Object</code>:
1599          The same object that was returned by
1600            <code><a href="/reference/android/support/wearable/view/GridPagerAdapter.html#instantiateItem(android.view.ViewGroup, int, int)">instantiateItem(ViewGroup, int, int)</a></code>.
1601</td>
1602      </tr>
1603    </table>
1604
1605</div>
1606
1607
1608<A NAME="finishUpdate(android.view.ViewGroup)"></A>
1609
1610<div class="api apilevel-">
1611    <h3 class="api-name">finishUpdate</h3>
1612    <div class="api-level">
1613      <div></div>
1614
1615
1616
1617    </div>
1618<pre class="api-signature no-pretty-print">
1619void finishUpdate (ViewGroup container)</pre>
1620
1621
1622
1623
1624  <p>Called when the a change in the shown pages has been completed. At this point you must ensure
1625 that all of the pages have actually been added or removed from the container as appropriate.</p>
1626    <table class="responsive">
1627    <tr><th colspan=2>Parameters</th></tr>
1628      <tr>
1629        <td><code>container</code></td>
1630        <td width="100%">
1631          <code>ViewGroup</code>:
1632          The containing View which is displaying this adapter's page views
1633</td>
1634      </tr>
1635    </table>
1636
1637</div>
1638
1639
1640<A NAME="getBackgroundForPage(int, int)"></A>
1641
1642<div class="api apilevel-">
1643    <h3 class="api-name">getBackgroundForPage</h3>
1644    <div class="api-level">
1645      <div></div>
1646
1647
1648
1649    </div>
1650<pre class="api-signature no-pretty-print">
1651Drawable getBackgroundForPage (int row,
1652                int column)</pre>
1653
1654
1655
1656
1657  <p>Provides content to be displayed as background for a specific page.
1658 <p>
1659 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.
1660 and the row background should be used (if any).
1661 <p>
1662 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
1663 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
1664 called to request the new value when necessary.</p>
1665    <table class="responsive">
1666    <tr><th colspan=2>Parameters</th></tr>
1667      <tr>
1668        <td><code>row</code></td>
1669        <td width="100%">
1670          <code>int</code>:
1671          the row of the page</td>
1672      </tr>
1673      <tr>
1674        <td><code>column</code></td>
1675        <td width="100%">
1676          <code>int</code>:
1677          the column of the page
1678</td>
1679      </tr>
1680    </table>
1681    <table class="responsive">
1682      <tr><th colspan=2>Returns</th></tr>
1683      <tr>
1684        <td><code>Drawable</code></td>
1685        <td width="100%"><!-- no returns description in source --></td>
1686      </tr>
1687    </table>
1688
1689</div>
1690
1691
1692<A NAME="getBackgroundForRow(int)"></A>
1693
1694<div class="api apilevel-">
1695    <h3 class="api-name">getBackgroundForRow</h3>
1696    <div class="api-level">
1697      <div></div>
1698
1699
1700
1701    </div>
1702<pre class="api-signature no-pretty-print">
1703Drawable getBackgroundForRow (int row)</pre>
1704
1705
1706
1707
1708  <p>Provides content to be displayed as the default background for all pages on the given row.
1709 <p>
1710 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
1711 those applied by <code><a href="/reference/android/support/wearable/view/GridPagerAdapter.html#getBackgroundForPage(int, int)">getBackgroundForPage(int, int)</a></code>.
1712 <p>
1713 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
1714 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
1715 called to request the new value when necessary.</p>
1716    <table class="responsive">
1717    <tr><th colspan=2>Parameters</th></tr>
1718      <tr>
1719        <td><code>row</code></td>
1720        <td width="100%">
1721          <code>int</code>:
1722          the row of the page</td>
1723      </tr>
1724    </table>
1725    <table class="responsive">
1726      <tr><th colspan=2>Returns</th></tr>
1727      <tr>
1728        <td><code>Drawable</code></td>
1729        <td width="100%">a drawable to display for the row
1730</td>
1731      </tr>
1732    </table>
1733
1734</div>
1735
1736
1737<A NAME="getColumnCount(int)"></A>
1738
1739<div class="api apilevel-">
1740    <h3 class="api-name">getColumnCount</h3>
1741    <div class="api-level">
1742      <div></div>
1743
1744
1745
1746    </div>
1747<pre class="api-signature no-pretty-print">
1748int getColumnCount (int row)</pre>
1749
1750
1751
1752
1753  <p>Returns the maximum number of columns for each row. The number of columns may vary by row.
1754</p>
1755    <table class="responsive">
1756    <tr><th colspan=2>Parameters</th></tr>
1757      <tr>
1758        <td><code>row</code></td>
1759        <td width="100%">
1760          <code>int</code>
1761          <!-- no parameter comment --></td>
1762      </tr>
1763    </table>
1764    <table class="responsive">
1765      <tr><th colspan=2>Returns</th></tr>
1766      <tr>
1767        <td><code>int</code></td>
1768        <td width="100%"><!-- no returns description in source --></td>
1769      </tr>
1770    </table>
1771
1772</div>
1773
1774
1775<A NAME="getCurrentColumnForRow(int, int)"></A>
1776
1777<div class="api apilevel-">
1778    <h3 class="api-name">getCurrentColumnForRow</h3>
1779    <div class="api-level">
1780      <div></div>
1781
1782
1783
1784    </div>
1785<pre class="api-signature no-pretty-print">
1786int getCurrentColumnForRow (int row,
1787                int currentColumn)</pre>
1788
1789
1790
1791
1792  <p>Returns the column to arrive at when navigating vertically to the specified row.
1793 <p>
1794 The default implementation simply returns 0.</p>
1795    <table class="responsive">
1796    <tr><th colspan=2>Parameters</th></tr>
1797      <tr>
1798        <td><code>row</code></td>
1799        <td width="100%">
1800          <code>int</code>:
1801          the row in question</td>
1802      </tr>
1803      <tr>
1804        <td><code>currentColumn</code></td>
1805        <td width="100%">
1806          <code>int</code>:
1807          the column which is currently centered</td>
1808      </tr>
1809    </table>
1810    <table class="responsive">
1811      <tr><th colspan=2>Returns</th></tr>
1812      <tr>
1813        <td><code>int</code></td>
1814        <td width="100%">the column to arrive at
1815</td>
1816      </tr>
1817    </table>
1818
1819</div>
1820
1821
1822<A NAME="getItemPosition(java.lang.Object)"></A>
1823
1824<div class="api apilevel-">
1825    <h3 class="api-name">getItemPosition</h3>
1826    <div class="api-level">
1827      <div></div>
1828
1829
1830
1831    </div>
1832<pre class="api-signature no-pretty-print">
1833Point getItemPosition (Object object)</pre>
1834
1835
1836
1837
1838  <p>Called when the host view is attempting to determine if an item's position has changed.
1839 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
1840 <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.
1841 <p>
1842 The default implementation assumes that all items have been removed and always returns
1843 <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>
1844    <table class="responsive">
1845    <tr><th colspan=2>Parameters</th></tr>
1846      <tr>
1847        <td><code>object</code></td>
1848        <td width="100%">
1849          <code>Object</code>:
1850          Object representing an item, previously returned by a call to
1851            <code><a href="/reference/android/support/wearable/view/GridPagerAdapter.html#instantiateItem(android.view.ViewGroup, int, int)">instantiateItem(ViewGroup, int, int)</a></code>.</td>
1852      </tr>
1853    </table>
1854    <table class="responsive">
1855      <tr><th colspan=2>Returns</th></tr>
1856      <tr>
1857        <td><code>Point</code></td>
1858        <td width="100%">object's new position with row from [0, getRowCount()] and column from [0,
1859         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
1860         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.
1861</td>
1862      </tr>
1863    </table>
1864
1865</div>
1866
1867
1868<A NAME="getOptionsForPage(int, int)"></A>
1869
1870<div class="api apilevel-">
1871    <h3 class="api-name">getOptionsForPage</h3>
1872    <div class="api-level">
1873      <div></div>
1874
1875
1876
1877    </div>
1878<pre class="api-signature no-pretty-print">
1879int getOptionsForPage (int row,
1880                int column)</pre>
1881
1882
1883
1884
1885  <p>Provides a set of features to apply to a page background. The return value should be a
1886 combination of one or more of the following, combined via bitwise-or:
1887 <ul>
1888 <li> <code><a href="/reference/android/support/wearable/view/GridPagerAdapter.html#OPTION_DISABLE_PARALLAX">OPTION_DISABLE_PARALLAX</a></code>
1889 </ul>
1890 The default return value is <code><a href="/reference/android/support/wearable/view/GridPagerAdapter.html#PAGE_DEFAULT_OPTIONS">PAGE_DEFAULT_OPTIONS</a></code>.</p>
1891    <table class="responsive">
1892    <tr><th colspan=2>Parameters</th></tr>
1893      <tr>
1894        <td><code>row</code></td>
1895        <td width="100%">
1896          <code>int</code>:
1897          the row of the page</td>
1898      </tr>
1899      <tr>
1900        <td><code>column</code></td>
1901        <td width="100%">
1902          <code>int</code>:
1903          the column of the page</td>
1904      </tr>
1905    </table>
1906    <table class="responsive">
1907      <tr><th colspan=2>Returns</th></tr>
1908      <tr>
1909        <td><code>int</code></td>
1910        <td width="100%">a bitwise OR of all requested options
1911</td>
1912      </tr>
1913    </table>
1914
1915</div>
1916
1917
1918<A NAME="getRowCount()"></A>
1919
1920<div class="api apilevel-">
1921    <h3 class="api-name">getRowCount</h3>
1922    <div class="api-level">
1923      <div></div>
1924
1925
1926
1927    </div>
1928<pre class="api-signature no-pretty-print">
1929int getRowCount ()</pre>
1930
1931
1932
1933
1934  <p>Returns the number of rows available.
1935</p>
1936    <table class="responsive">
1937      <tr><th colspan=2>Returns</th></tr>
1938      <tr>
1939        <td><code>int</code></td>
1940        <td width="100%"><!-- no returns description in source --></td>
1941      </tr>
1942    </table>
1943
1944</div>
1945
1946
1947<A NAME="instantiateItem(android.view.ViewGroup, int, int)"></A>
1948
1949<div class="api apilevel-">
1950    <h3 class="api-name">instantiateItem</h3>
1951    <div class="api-level">
1952      <div></div>
1953
1954
1955
1956    </div>
1957<pre class="api-signature no-pretty-print">
1958Object instantiateItem (ViewGroup container,
1959                int row,
1960                int column)</pre>
1961
1962
1963
1964
1965  <p>Creates the page for the given position. The adapter is responsible for adding the view to
1966 the container given here, although it only must ensure this is done by the time it returns
1967 from <code><a href="/reference/android/support/wearable/view/GridPagerAdapter.html#finishUpdate(android.view.ViewGroup)">finishUpdate(ViewGroup)</a></code></p>
1968    <table class="responsive">
1969    <tr><th colspan=2>Parameters</th></tr>
1970      <tr>
1971        <td><code>container</code></td>
1972        <td width="100%">
1973          <code>ViewGroup</code>:
1974          containing View in which the page will be shown</td>
1975      </tr>
1976      <tr>
1977        <td><code>row</code></td>
1978        <td width="100%">
1979          <code>int</code>:
1980          the row to be instantiated</td>
1981      </tr>
1982      <tr>
1983        <td><code>column</code></td>
1984        <td width="100%">
1985          <code>int</code>:
1986          the column within the row to be instantiated</td>
1987      </tr>
1988    </table>
1989    <table class="responsive">
1990      <tr><th colspan=2>Returns</th></tr>
1991      <tr>
1992        <td><code>Object</code></td>
1993        <td width="100%">a an object representing the new page
1994</td>
1995      </tr>
1996    </table>
1997
1998</div>
1999
2000
2001<A NAME="isViewFromObject(android.view.View, java.lang.Object)"></A>
2002
2003<div class="api apilevel-">
2004    <h3 class="api-name">isViewFromObject</h3>
2005    <div class="api-level">
2006      <div></div>
2007
2008
2009
2010    </div>
2011<pre class="api-signature no-pretty-print">
2012boolean isViewFromObject (View view,
2013                Object object)</pre>
2014
2015
2016
2017
2018  <p>Determines whether a page View is associated with a specific key object as returned by
2019 <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
2020 function properly.</p>
2021    <table class="responsive">
2022    <tr><th colspan=2>Parameters</th></tr>
2023      <tr>
2024        <td><code>view</code></td>
2025        <td width="100%">
2026          <code>View</code>:
2027          Page View to check for association with <code>object</code></td>
2028      </tr>
2029      <tr>
2030        <td><code>object</code></td>
2031        <td width="100%">
2032          <code>Object</code>:
2033          Object to check for association with <code>view</code></td>
2034      </tr>
2035    </table>
2036    <table class="responsive">
2037      <tr><th colspan=2>Returns</th></tr>
2038      <tr>
2039        <td><code>boolean</code></td>
2040        <td width="100%">true if <code>view</code> is associated with the key object <code>object</code>
2041</td>
2042      </tr>
2043    </table>
2044
2045</div>
2046
2047
2048<A NAME="notifyDataSetChanged()"></A>
2049
2050<div class="api apilevel-">
2051    <h3 class="api-name">notifyDataSetChanged</h3>
2052    <div class="api-level">
2053      <div></div>
2054
2055
2056
2057    </div>
2058<pre class="api-signature no-pretty-print">
2059void notifyDataSetChanged ()</pre>
2060
2061
2062
2063
2064  <p>This method should be called by the application if the data backing this adapter has changed
2065 and associated views should update.
2066</p>
2067
2068</div>
2069
2070
2071<A NAME="notifyPageBackgroundChanged(int, int)"></A>
2072
2073<div class="api apilevel-">
2074    <h3 class="api-name">notifyPageBackgroundChanged</h3>
2075    <div class="api-level">
2076      <div></div>
2077
2078
2079
2080    </div>
2081<pre class="api-signature no-pretty-print">
2082void notifyPageBackgroundChanged (int row,
2083                int column)</pre>
2084
2085
2086
2087
2088  <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>
2089 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
2090 removed and the the new value will be requested when necessary.
2091</p>
2092    <table class="responsive">
2093    <tr><th colspan=2>Parameters</th></tr>
2094      <tr>
2095        <td><code>row</code></td>
2096        <td width="100%">
2097          <code>int</code>
2098          <!-- no parameter comment --></td>
2099      </tr>
2100      <tr>
2101        <td><code>column</code></td>
2102        <td width="100%">
2103          <code>int</code>
2104          <!-- no parameter comment --></td>
2105      </tr>
2106    </table>
2107
2108</div>
2109
2110
2111<A NAME="notifyRowBackgroundChanged(int)"></A>
2112
2113<div class="api apilevel-">
2114    <h3 class="api-name">notifyRowBackgroundChanged</h3>
2115    <div class="api-level">
2116      <div></div>
2117
2118
2119
2120    </div>
2121<pre class="api-signature no-pretty-print">
2122void notifyRowBackgroundChanged (int row)</pre>
2123
2124
2125
2126
2127  <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>
2128 changes. Any cached value is removed and the the new value will be requested when necessary.
2129</p>
2130    <table class="responsive">
2131    <tr><th colspan=2>Parameters</th></tr>
2132      <tr>
2133        <td><code>row</code></td>
2134        <td width="100%">
2135          <code>int</code>
2136          <!-- no parameter comment --></td>
2137      </tr>
2138    </table>
2139
2140</div>
2141
2142
2143<A NAME="registerDataSetObserver(android.database.DataSetObserver)"></A>
2144
2145<div class="api apilevel-">
2146    <h3 class="api-name">registerDataSetObserver</h3>
2147    <div class="api-level">
2148      <div></div>
2149
2150
2151
2152    </div>
2153<pre class="api-signature no-pretty-print">
2154void registerDataSetObserver (DataSetObserver observer)</pre>
2155
2156
2157
2158
2159  <p>Register an observer to receive callbacks related to the adapter's data changing.</p>
2160    <table class="responsive">
2161    <tr><th colspan=2>Parameters</th></tr>
2162      <tr>
2163        <td><code>observer</code></td>
2164        <td width="100%">
2165          <code>DataSetObserver</code>:
2166          The <code><a href="/reference/android/database/DataSetObserver.html">DataSetObserver</a></code> which will receive callbacks.
2167</td>
2168      </tr>
2169    </table>
2170
2171</div>
2172
2173
2174<A NAME="restoreState(android.os.Parcelable, java.lang.ClassLoader)"></A>
2175
2176<div class="api apilevel-">
2177    <h3 class="api-name">restoreState</h3>
2178    <div class="api-level">
2179      <div></div>
2180
2181
2182
2183    </div>
2184<pre class="api-signature no-pretty-print">
2185void restoreState (Parcelable savedState,
2186                ClassLoader classLoader)</pre>
2187
2188
2189
2190
2191  <p>Restores the previously saved state of this adapter.
2192</p>
2193    <table class="responsive">
2194    <tr><th colspan=2>Parameters</th></tr>
2195      <tr>
2196        <td><code>savedState</code></td>
2197        <td width="100%">
2198          <code>Parcelable</code>
2199          <!-- no parameter comment --></td>
2200      </tr>
2201      <tr>
2202        <td><code>classLoader</code></td>
2203        <td width="100%">
2204          <code>ClassLoader</code>
2205          <!-- no parameter comment --></td>
2206      </tr>
2207    </table>
2208
2209</div>
2210
2211
2212<A NAME="saveState()"></A>
2213
2214<div class="api apilevel-">
2215    <h3 class="api-name">saveState</h3>
2216    <div class="api-level">
2217      <div></div>
2218
2219
2220
2221    </div>
2222<pre class="api-signature no-pretty-print">
2223Parcelable saveState ()</pre>
2224
2225
2226
2227
2228  <p>Saves the current state of this adapter.
2229</p>
2230    <table class="responsive">
2231      <tr><th colspan=2>Returns</th></tr>
2232      <tr>
2233        <td><code>Parcelable</code></td>
2234        <td width="100%"><!-- no returns description in source --></td>
2235      </tr>
2236    </table>
2237
2238</div>
2239
2240
2241<A NAME="setCurrentColumnForRow(int, int)"></A>
2242
2243<div class="api apilevel-">
2244    <h3 class="api-name">setCurrentColumnForRow</h3>
2245    <div class="api-level">
2246      <div></div>
2247
2248
2249
2250    </div>
2251<pre class="api-signature no-pretty-print">
2252void setCurrentColumnForRow (int row,
2253                int currentColumn)</pre>
2254
2255
2256
2257
2258  <p>Called to inform the adapter of which column is now current for the given row. This
2259 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>.
2260 The default implementation does nothing.</p>
2261    <table class="responsive">
2262    <tr><th colspan=2>Parameters</th></tr>
2263      <tr>
2264        <td><code>row</code></td>
2265        <td width="100%">
2266          <code>int</code>:
2267          the row for the column change</td>
2268      </tr>
2269      <tr>
2270        <td><code>currentColumn</code></td>
2271        <td width="100%">
2272          <code>int</code>:
2273          the column which is now current
2274</td>
2275      </tr>
2276    </table>
2277
2278</div>
2279
2280
2281<A NAME="startUpdate(android.view.ViewGroup)"></A>
2282
2283<div class="api apilevel-">
2284    <h3 class="api-name">startUpdate</h3>
2285    <div class="api-level">
2286      <div></div>
2287
2288
2289
2290    </div>
2291<pre class="api-signature no-pretty-print">
2292void startUpdate (ViewGroup container)</pre>
2293
2294
2295
2296
2297  <p>Called when a change in the shown pages is going to start being made.</p>
2298    <table class="responsive">
2299    <tr><th colspan=2>Parameters</th></tr>
2300      <tr>
2301        <td><code>container</code></td>
2302        <td width="100%">
2303          <code>ViewGroup</code>:
2304          The containing View which is displaying this adapter's page views.
2305</td>
2306      </tr>
2307    </table>
2308
2309</div>
2310
2311
2312<A NAME="unregisterDataSetObserver(android.database.DataSetObserver)"></A>
2313
2314<div class="api apilevel-">
2315    <h3 class="api-name">unregisterDataSetObserver</h3>
2316    <div class="api-level">
2317      <div></div>
2318
2319
2320
2321    </div>
2322<pre class="api-signature no-pretty-print">
2323void unregisterDataSetObserver (DataSetObserver observer)</pre>
2324
2325
2326
2327
2328  <p>Unregister an observer from callbacks related to the adapter's data changing.</p>
2329    <table class="responsive">
2330    <tr><th colspan=2>Parameters</th></tr>
2331      <tr>
2332        <td><code>observer</code></td>
2333        <td width="100%">
2334          <code>DataSetObserver</code>:
2335          The <code><a href="/reference/android/database/DataSetObserver.html">DataSetObserver</a></code> which will be unregistered.
2336</td>
2337      </tr>
2338    </table>
2339
2340</div>
2341
2342
2343
2344
2345
2346<!-- ========= METHOD DETAIL ======== -->
2347
2348<h2 class="api-section">Protected methods</h2>
2349
2350
2351
2352<A NAME="applyItemPosition(java.lang.Object, android.graphics.Point)"></A>
2353
2354<div class="api apilevel-">
2355    <h3 class="api-name">applyItemPosition</h3>
2356    <div class="api-level">
2357      <div></div>
2358
2359
2360
2361    </div>
2362<pre class="api-signature no-pretty-print">
2363void applyItemPosition (Object object,
2364                Point position)</pre>
2365
2366
2367
2368
2369  <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
2370 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>
2371    <table class="responsive">
2372    <tr><th colspan=2>Parameters</th></tr>
2373      <tr>
2374        <td><code>object</code></td>
2375        <td width="100%">
2376          <code>Object</code>:
2377          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>
2378      </tr>
2379      <tr>
2380        <td><code>position</code></td>
2381        <td width="100%">
2382          <code>Point</code>:
2383          position which was returned from <code><a href="/reference/android/support/wearable/view/GridPagerAdapter.html#getItemPosition(java.lang.Object)">getItemPosition(Object)</a></code>.
2384</td>
2385      </tr>
2386    </table>
2387
2388</div>
2389
2390
2391
2392
2393
2394<!-- ========= END OF CLASS DATA ========= -->
2395
2396</div><!-- end jd-content -->
2397
2398
2399
2400<div class="data-reference-resources-wrapper">
2401
2402  <ul data-reference-resources>
2403
2404
2405    <li><h2>Interfaces</h2>
2406      <ul>
2407          <li class="api apilevel-"><a href="/reference/android/support/wearable/view/ActionChooserView.ActionChooserListener.html">ActionChooserView.ActionChooserListener</a></li>
2408          <li class="api apilevel-"><a href="/reference/android/support/wearable/view/DelayedConfirmationView.DelayedConfirmationListener.html">DelayedConfirmationView.DelayedConfirmationListener</a></li>
2409          <li class="api apilevel-"><a href="/reference/android/support/wearable/view/GridPageOptions.html">GridPageOptions</a></li>
2410          <li class="api apilevel-"><a href="/reference/android/support/wearable/view/GridPageOptions.BackgroundListener.html">GridPageOptions.BackgroundListener</a></li>
2411          <li class="api apilevel-"><a href="/reference/android/support/wearable/view/GridViewPager.OnAdapterChangeListener.html">GridViewPager.OnAdapterChangeListener</a></li>
2412          <li class="api apilevel-"><a href="/reference/android/support/wearable/view/GridViewPager.OnPageChangeListener.html">GridViewPager.OnPageChangeListener</a></li>
2413          <li class="api apilevel-"><a href="/reference/android/support/wearable/view/WatchViewStub.OnLayoutInflatedListener.html">WatchViewStub.OnLayoutInflatedListener</a></li>
2414          <li class="api apilevel-"><a href="/reference/android/support/wearable/view/WearableListView.ClickListener.html">WearableListView.ClickListener</a></li>
2415          <li class="api apilevel-"><a href="/reference/android/support/wearable/view/WearableListView.OnCenterProximityListener.html">WearableListView.OnCenterProximityListener</a></li>
2416          <li class="api apilevel-"><a href="/reference/android/support/wearable/view/WearableListView.OnCentralPositionChangedListener.html">WearableListView.OnCentralPositionChangedListener</a></li>
2417          <li class="api apilevel-"><a href="/reference/android/support/wearable/view/WearableListView.OnScrollListener.html">WearableListView.OnScrollListener</a></li>
2418      </ul>
2419    </li>
2420
2421    <li><h2>Classes</h2>
2422      <ul>
2423          <li class="api apilevel-"><a href="/reference/android/support/wearable/view/ActionChooserView.html">ActionChooserView</a></li>
2424          <li class="api apilevel-"><a href="/reference/android/support/wearable/view/ActionLabel.html">ActionLabel</a></li>
2425          <li class="api apilevel-"><a href="/reference/android/support/wearable/view/ActionPage.html">ActionPage</a></li>
2426          <li class="api apilevel-"><a href="/reference/android/support/wearable/view/BoxInsetLayout.html">BoxInsetLayout</a></li>
2427          <li class="api apilevel-"><a href="/reference/android/support/wearable/view/BoxInsetLayout.LayoutParams.html">BoxInsetLayout.LayoutParams</a></li>
2428          <li class="api apilevel-"><a href="/reference/android/support/wearable/view/CardFragment.html">CardFragment</a></li>
2429          <li class="api apilevel-"><a href="/reference/android/support/wearable/view/CardFrame.html">CardFrame</a></li>
2430          <li class="api apilevel-"><a href="/reference/android/support/wearable/view/CardScrollView.html">CardScrollView</a></li>
2431          <li class="api apilevel-"><a href="/reference/android/support/wearable/view/CircledImageView.html">CircledImageView</a></li>
2432          <li class="api apilevel-"><a href="/reference/android/support/wearable/view/CircularButton.html">CircularButton</a></li>
2433          <li class="api apilevel-"><a href="/reference/android/support/wearable/view/CrossfadeDrawable.html">CrossfadeDrawable</a></li>
2434          <li class="api apilevel-"><a href="/reference/android/support/wearable/view/DelayedConfirmationView.html">DelayedConfirmationView</a></li>
2435          <li class="api apilevel-"><a href="/reference/android/support/wearable/view/DismissOverlayView.html">DismissOverlayView</a></li>
2436          <li class="api apilevel-"><a href="/reference/android/support/wearable/view/DotsPageIndicator.html">DotsPageIndicator</a></li>
2437          <li class="api apilevel-"><a href="/reference/android/support/wearable/view/FragmentGridPagerAdapter.html">FragmentGridPagerAdapter</a></li>
2438          <li class="selected api apilevel-"><a href="/reference/android/support/wearable/view/GridPagerAdapter.html">GridPagerAdapter</a></li>
2439          <li class="api apilevel-"><a href="/reference/android/support/wearable/view/GridViewPager.html">GridViewPager</a></li>
2440          <li class="api apilevel-"><a href="/reference/android/support/wearable/view/GridViewPager.LayoutParams.html">GridViewPager.LayoutParams</a></li>
2441          <li class="api apilevel-"><a href="/reference/android/support/wearable/view/ProgressSpinner.html">ProgressSpinner</a></li>
2442          <li class="api apilevel-"><a href="/reference/android/support/wearable/view/SimpleAnimatorListener.html">SimpleAnimatorListener</a></li>
2443          <li class="api apilevel-"><a href="/reference/android/support/wearable/view/WatchViewStub.html">WatchViewStub</a></li>
2444          <li class="api apilevel-"><a href="/reference/android/support/wearable/view/WearableFrameLayout.html">WearableFrameLayout</a></li>
2445          <li class="api apilevel-"><a href="/reference/android/support/wearable/view/WearableFrameLayout.LayoutParams.html">WearableFrameLayout.LayoutParams</a></li>
2446          <li class="api apilevel-"><a href="/reference/android/support/wearable/view/WearableListView.html">WearableListView</a></li>
2447          <li class="api apilevel-"><a href="/reference/android/support/wearable/view/WearableListView.Adapter.html">WearableListView.Adapter</a></li>
2448          <li class="api apilevel-"><a href="/reference/android/support/wearable/view/WearableListView.ViewHolder.html">WearableListView.ViewHolder</a></li>
2449      </ul>
2450    </li>
2451
2452
2453
2454  </ul>
2455
2456</div>
2457
2458
2459
2460</body>
2461</html>
2462