Skip to content

Instantly share code, notes, and snippets.

@ferPrieto
Created January 4, 2022 16:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ferPrieto/e3d923700c31d12b74874816325f8d63 to your computer and use it in GitHub Desktop.
Save ferPrieto/e3d923700c31d12b74874816325f8d63 to your computer and use it in GitHub Desktop.
This is the general view of the whole content in EntryPointActivity (it's been simplified for better understanding)
setContent {
SpaceXTheme {
val bottomNavigationItems = listOf(
BottomNavigationScreens.Dashboard,
BottomNavigationScreens.Launches
)
val navController = rememberNavController()
Scaffold(
bottomBar = {
BottomNavigation(navController, bottomNavigationItems)
}
) {
NavHost(navController, startDestination = BottomNavigationScreens.Dashboard.route) {
composable(BottomNavigationScreens.Dashboard.route) {
InitDashboardScreen()
}
composable(BottomNavigationScreens.Launches.route) {
InitLaunchesScreen()
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment