nav_graph.xml 1.0 KB

12345678910111213141516171819202122232425262728
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <navigation xmlns:android="http://schemas.android.com/apk/res/android"
  3. xmlns:app="http://schemas.android.com/apk/res-auto"
  4. xmlns:tools="http://schemas.android.com/tools"
  5. android:id="@+id/nav_graph"
  6. app:startDestination="@id/FirstFragment">
  7. <fragment
  8. android:id="@+id/FirstFragment"
  9. android:name="com.hx.utils.mydemoapplication.ui.FirstFragment"
  10. android:label="@string/first_fragment_label"
  11. tools:layout="@layout/fragment_first">
  12. <action
  13. android:id="@+id/action_FirstFragment_to_SecondFragment"
  14. app:destination="@id/SecondFragment" />
  15. </fragment>
  16. <fragment
  17. android:id="@+id/SecondFragment"
  18. android:name="com.hx.utils.mydemoapplication.ui.SecondFragment"
  19. android:label="@string/second_fragment_label"
  20. tools:layout="@layout/fragment_second">
  21. <action
  22. android:id="@+id/action_SecondFragment_to_FirstFragment"
  23. app:destination="@id/FirstFragment" />
  24. </fragment>
  25. </navigation>