Archie

    Archie

    1 year ago
    BottomBar no longer updates Scaffold's
    contentPadding
    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

    Doris Liu

    1 year ago
    Please file a bug with https://issuetracker.google.com/
    Archie

    Archie

    1 year ago