To be able to preserve the backstack and state of the fragments using the Navigation Components and BottomNavigationView, Google has written the NavigationExtensions function.
However, since it's managing the nav graph on its own, does this nullify the navController.graph property? And therefore, can't we switch to the bottomnavigation graphs that we set by using setupWithNavController after having an another nav graph set?
I am trying to navigate from my splash fragment to the BottomNavigationView graphs. But if I set the app:navGraph
XML property to my splash graph, both the nav graphs' and splash screen's fragments become visible after the BottomNavigation graphs are set.
Is there a practical solution to achieve this goal?
question from:
https://stackoverflow.com/questions/65938561/android-switching-from-a-navgraph-to-another-using-googles-nav-extensions-fun 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…