https://kotlinlang.org logo
#compose
Title
# compose
a

Archie

12/11/2020, 12:03 PM
BottomBar no longer updates `Scaffold`'s
contentPadding
whenever
bottomBar
changes visibility.
Copy code
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)  
        }
        ...
    }
}
d

Doris Liu

12/11/2020, 10:03 PM
Please file a bug with https://issuetracker.google.com/
a

Archie

12/12/2020, 6:42 AM
2 Views