Just visited the google repo on the last alpha realease of navigation library, version 2.4.0-alpha02. I have a big doubt on what will be the right approach to show a onBoarding graph and then load the navgraph of multiple stacks, all that in just one activity.
If I understand correctly, the FragmentContainerView, in the last update, it needs a navGraph with the <include>of the sections we want to have inside our app, and a startDestination of one of that includes.
The doubt on navigation:
What would be the right implementation? I mean, I looked at the docs and the part of conditional navigation, but this part does not seems to fit inside.
What I tried:
- I inflate inside the FragmentContainerView the navGraph of the onboarding, then after the onboarding its done, I inflate inside the same FragmentContainer another navgraph, the one for the multiple backStack, this aproach seems to have a visual impact, because the view when the FragmentContainerView gets his navGraph inflated inside, the view goes white...
- I used the fragmentManager of activity as the NavHost, to load first the onBoarding graph and then the FragmentContainerView with his navGraph, this option improve the visual problem mentioned in 1. but the multiple backstack stopped working, my guess is that FragmentContainerView, needs to be the navHost.