There are several ways of navigating from one navigation graph to another graph. From the top of my head:
- use
<include app:graph="@navigation/nav_graph_1"/>
and have an action to that included graph like
<action android:id="@+id/action_fragment_to_nav_graph_1" app:destination="@id/nav_graph_1" />
- use a nested graph:
<navigation>
... some <fragments/>
<navigation>
...some other fragments...
</navigation>
</navigation>
- Use global actions
I'm having a hard time to figure out the differences between those methods (actually I don't see any obvious ones). Are there use cases where I should prefer one method over another?