File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
wear/src/main/java/com/example/wear/snippets/rotary Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -242,6 +242,20 @@ fun SnapScrollableScreen() {
242242 // [END android_wear_rotary_input_snap_fling]
243243}
244244
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+
245259@WearPreviewDevices
246260@WearPreviewFontScales
247261@Composable
@@ -262,3 +276,10 @@ fun ScrollableScreenPreview() {
262276fun SnapScrollableScreenPreview () {
263277 SnapScrollableScreen ()
264278}
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