xxfast
11/10/2022, 3:35 AMm3.NavigationBar
Whats the right way to apply windowInsetsPadding
to bottom NavigationBar
? I'm doing this right now
NavigationBar(
modifier = Modifier
.windowInsetsPadding(WindowInsets.navigationBars),
) {
pages.forEach { page ->
NavigationBarItem(..)
}
}
It looks all wrong 🤔Oleksandr Balan
11/10/2022, 8:04 AMNavigationBar
in the `Surface`:
// Wrap with surface to "extend" navigation bar below the system navigation bar
Surface(
color = NavigationBarDefaults.containerColor,
tonalElevation = NavigationBarDefaults.Elevation,
modifier = modifier,
) {
NavigationBar(
tonalElevation = 0.dp,
modifier = Modifier.navigationBarsPadding(),
) {
...
}
}
Also note, that tonal elevation is “moved” from NavigationBar
to the Surface
Jan BĂna
11/10/2022, 9:44 AMxxfast
11/11/2022, 7:48 AMxxfast
11/11/2022, 7:50 AMNavigationBarDefaults
is internal right 🤔 is there way for us to extend these?Oleksandr Balan
11/11/2022, 8:04 AMNavigationBarDefaults
is public there 🤷