0

There are several ways of navigating from one navigation graph to another graph. From the top of my head:

  1. 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" />
  2. use a nested graph:
<navigation> 
  ... some <fragments/>
   <navigation>
    ...some other fragments... 
   </navigation> 
</navigation>
  1. 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?

ASP
  • 773
  • 1
  • 8
  • 22

0 Answers0