File tree 1 file changed +21
-0
lines changed
wear/src/main/java/com/example/wear/snippets/rotary
1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -242,6 +242,20 @@ fun SnapScrollableScreen() {
242
242
// [END android_wear_rotary_input_snap_fling]
243
243
}
244
244
245
+ @Composable
246
+ fun PositionScrollIndicator (){
247
+ // [START android_wear_rotary_position_indicator]
248
+ val listState = rememberScalingLazyListState()
249
+ Scaffold (
250
+ positionIndicator = {
251
+ PositionIndicator (scalingLazyListState = listState)
252
+ }
253
+ ) {
254
+ // ...
255
+ }
256
+ // [END android_wear_rotary_position_indicator]
257
+ }
258
+
245
259
@WearPreviewDevices
246
260
@WearPreviewFontScales
247
261
@Composable
@@ -262,3 +276,10 @@ fun ScrollableScreenPreview() {
262
276
fun SnapScrollableScreenPreview () {
263
277
SnapScrollableScreen ()
264
278
}
279
+
280
+ @WearPreviewDevices
281
+ @WearPreviewFontScales
282
+ @Composable
283
+ fun PositionScrollIndicatorPreview () {
284
+ PositionScrollIndicator ()
285
+ }
You can’t perform that action at this time.
0 commit comments