-
I'm using I have a Home Screen that has a bottom I modified the sample Star app 1 and I was able to reproduce it there as well. Not sure if I'm using Code snippet of the modified version of the Star sample app to demonstrate the issue
@CircuitInject(screen = HomeScreen::class, scope = AppScope::class)
@Composable
fun HomeContent(state: HomeScreen.State, modifier: Modifier = Modifier) {
var contentComposed by rememberRetained { mutableStateOf(false) }
Scaffold(
modifier = modifier.fillMaxWidth(),
contentWindowInsets = WindowInsets(0, 0, 0, 0),
containerColor = Color.Transparent,
bottomBar = {
StarTheme(useDarkTheme = true) {
BottomNavigationBar(selectedIndex = state.selectedIndex) { index ->
state.eventSink(ClickNavItem(index))
}
}
}
) { paddingValues ->
contentComposed = true
val screen = state.navItems[state.selectedIndex].screen
val backstack = rememberSaveableBackStack { push(screen) }
val navigator = rememberCircuitNavigator(backstack)
NavigableCircuitContent(
backstack = backstack ,
navigator = navigator,
modifier = Modifier
.padding(paddingValues)
.fillMaxHeight(),
)
}
ReportDrawnWhen { contentComposed }
} Sample video: Screen_recording_20230928_144331.mp4 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
I've been reading this a few times and I'm still not exactly sure I understand what the question is 😅. In your change, you placed the navigable content within the scaffold, so of course it wouldn't replace the outer UI's navigation bar. Am I missing something? |
Beta Was this translation helpful? Give feedback.
Yeah that's correct. The nested content in this case doesn't know anything about the outer scaffold or its bottom bar