I want to use the Jetpack Compose scaffold and app bars in my android app. I want to have the scaffold content as well as the scaffolds BottomAppBar content change with navigation. I tried to use a second NavHost for the BottomAppBar content on the same NavController but that didn’t work (after the first navigation, the bottom bar would remain blank)
Scaffold(content = { paddingValues ->
ContentNavHost(paddingValues, navController)
}
, bottomBar = {
BottomAppBar (content={
BottomBarNavHost(navController)
}))
Obviously, I can create individual scaffolds with their own app bars, but that causes the entire app bar to re-render on every switch.
I would like to be able to use my navController in two places, or something similar.