Archie
12/11/2020, 12:03 PMcontentPadding
whenever bottomBar
changes visibility.
Scaffold(
bottomBar = {
AnimatedVisibility(
visible = currentBackStack?.arguments?.getString(KEY_ROUTE) == secondScreenRoute
...
) {
SomeComposable()
}
}
) { padding ->
val modifier = Modifier.padding(padding)
NavHost(navController, startDestination = startRoute) {
composable(startRoute) {
FirstScreen(modifier)
}
composable(secondScreenRoute) {
// When the bottomBar is shown on this screen
// it overlaps the content of second screen
SecondScreen(modifier)
}
...
}
}
Doris Liu
12/11/2020, 10:03 PMArchie
12/12/2020, 6:42 AM