Kamil K
08/03/2023, 8:50 PM@Composable
fun MainNavHost(
...
) {
Scaffold(
bottomBar = ...
) {
NavHost(
navController = navController,
startDestination = startingDestination.route,
) {
splashGraph()
onboardingGraph(factory)
bottomNavigationGraph(factory, paddingValues)
}
}
}
Or I can have a NavHost for my bottomNavigationGraph and scaffold inside?Stylianos Gakis
08/03/2023, 9:11 PMandroidx.core:core-splashscreen
https://developer.android.com/develop/ui/views/launch/splash-screen/migrate
For onboarding, in theory you can achieve this by keeping your home screen as your start destination, and conditionally navigate to your onboarding in certain situations, this video discusses about how to handle login destination this way, which would apply to onboarding for you.
In practice it may be a bit tricky, but in general the navigation library doesn’t really want you to keep more than one NavHost.
Follow this message https://kotlinlang.slack.com/archives/CJLTWPH7S/p1679869124943059?thread_ts=1679868162.988109&cid=CJLTWPH7S and the ones linked back to get more contextKamil K
08/03/2023, 9:36 PMStylianos Gakis
08/03/2023, 9:53 PMIan Lake
08/03/2023, 11:19 PM