Skip to content

Commit 70285ac

Browse files
authoredMay 13, 2025··
Fix scrollState for List and expand the snippet to show more code for completeness (#517)
* Fix scrollState for List and expand the snippet to show kore code for completeness * Apply Spotless --------- Co-authored-by: kul3r4 <[email protected]>
1 parent 21896a6 commit 70285ac

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed
 

‎wear/src/main/java/com/example/wear/snippets/m3/navigation/Navigation.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,11 @@ fun navigation() {
5757
}
5858
}
5959
}
60-
// [START_EXCLUDE]
6160
}
6261

62+
// Implementation of one of the screens in the navigation
6363
@Composable
6464
fun MessageDetail(id: String) {
65-
// [END_EXCLUDE]
6665
// .. Screen level content goes here
6766
val scrollState = rememberTransformingLazyColumnState()
6867

‎wear/src/main/java/com/example/wear/snippets/m3/rotary/Rotary.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ fun SnapScrollableScreen() {
170170
// [START android_wear_rotary_input_snap_fling]
171171
val listState = rememberScalingLazyListState()
172172
ScreenScaffold(
173+
scrollState = listState,
173174
scrollIndicator = {
174175
ScrollIndicator(state = listState)
175176
}
@@ -202,6 +203,7 @@ fun PositionScrollIndicator() {
202203
// [START android_wear_rotary_position_indicator]
203204
val listState = rememberTransformingLazyColumnState()
204205
ScreenScaffold(
206+
scrollState = listState,
205207
scrollIndicator = {
206208
ScrollIndicator(state = listState)
207209
}

0 commit comments

Comments
 (0)
Please sign in to comment.