Skip to content

Commit

Permalink
Include AppScaffold in navigation Snippet (#385)
Browse files Browse the repository at this point in the history
  • Loading branch information
kul3r4 authored Oct 31, 2024
1 parent 195bd61 commit d081491
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ import com.google.android.horologist.compose.rotaryinput.rotaryWithScroll

@Composable
fun navigation() {
// [START android_wear_navigation]
AppScaffold {
// [START android_wear_navigation]
val navController = rememberSwipeDismissableNavController()
SwipeDismissableNavHost(
navController = navController,
Expand All @@ -63,16 +63,20 @@ fun navigation() {
MessageDetail(id = it.arguments?.getString("id")!!)
}
}
// [END android_wear_navigation]
}
// [START_EXCLUDE]
}

@OptIn(ExperimentalHorologistApi::class)
@Composable
fun MessageDetail(id: String) {
// [END_EXCLUDE]
// .. Screen level content goes here
val scrollState = rememberScrollState()

ScreenScaffold(scrollState = scrollState) {
// Screen content goes here
// [END android_wear_navigation]
val padding = ScalingLazyColumnDefaults.padding(
first = ItemType.Text,
last = ItemType.Text
Expand Down

0 comments on commit d081491

Please sign in to comment.