https://kotlinlang.org logo
s

Simone Summo

03/05/2021, 9:50 AM
Hello, I am following this to implement navigation with bottomBar, now I want to open a child from a list that need to show full screen, I call it a modal, how can I achieve this behaviour? At the moment, using nested navigation, it opens inside the content space, with the bottom bar visible.
i

Ian Lake

03/05/2021, 3:50 PM
You can certainly use that same technique to hide/show the bottom bar when the destination changes to your "modal" destination
t

Tony Kazanjian

03/05/2021, 6:11 PM
In my NavHost I basically just have any composable that needs a BottomBar wrapped in a Scaffold that contains the bottom bar, and anything else that needs to be full-screen is just a "naked" composable:
Copy code
composable(DetailDestinationScreens.Details.route){
            ItemDetailScreen(getViewModel(), navController)
        }

        composable(BottomNavigationScreens.Home.route){
            Scaffold(bottomBar = { BottomNavigation(navHostController = navController, screens = BottomNavigationScreens.values())}) {
                HomeFeed(getViewModel())
            }
        }