nav_graph.xml 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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.xml"
  6. app:startDestination="@id/splashFragment">
  7. <fragment
  8. android:id="@+id/splashFragment"
  9. android:name="com.mrozon.feature_splash.presentation.SplashFragment"
  10. android:label="SplashFragment"
  11. tools:layout="@layout/fragment_splash" >
  12. <action
  13. android:id="@+id/action_splashFragment_to_loginFragment"
  14. app:destination="@id/loginFragment"
  15. app:enterAnim="@anim/slide_in_right"
  16. app:exitAnim="@anim/slide_out_left"
  17. app:launchSingleTop="true"
  18. app:popEnterAnim="@anim/slide_in_left"
  19. app:popExitAnim="@anim/slide_out_right" />
  20. <action
  21. android:id="@+id/action_splashFragment_to_listPersonFragment"
  22. app:destination="@id/listPersonFragment"
  23. app:enterAnim="@anim/slide_in_right"
  24. app:exitAnim="@anim/slide_out_left"
  25. app:launchSingleTop="true"
  26. app:popEnterAnim="@anim/slide_in_left"
  27. app:popExitAnim="@anim/slide_out_right"
  28. app:popUpTo="@id/listPersonFragment"
  29. app:popUpToInclusive="true" />
  30. </fragment>
  31. <fragment
  32. android:id="@+id/loginFragment"
  33. android:name="com.mrozon.feature_auth.presentation.LoginFragment"
  34. tools:layout="@layout/fragment_login"
  35. android:label="LoginFragment" >
  36. <action
  37. android:id="@+id/action_loginFragment_to_registrationFragment"
  38. app:destination="@id/registrationFragment"
  39. app:enterAnim="@anim/slide_in_right"
  40. app:exitAnim="@anim/slide_out_left"
  41. app:popEnterAnim="@anim/slide_in_left"
  42. app:popExitAnim="@anim/slide_out_right"/>
  43. <action
  44. android:id="@+id/action_loginFragment_to_listPersonFragment"
  45. app:destination="@id/listPersonFragment"
  46. app:enterAnim="@anim/slide_in_right"
  47. app:exitAnim="@anim/slide_out_left"
  48. app:popEnterAnim="@anim/slide_in_left"
  49. app:popExitAnim="@anim/slide_out_right"
  50. app:popUpTo="@id/listPersonFragment"
  51. app:popUpToInclusive="true" />
  52. </fragment>
  53. <fragment
  54. android:id="@+id/registrationFragment"
  55. tools:layout="@layout/fragment_registration"
  56. android:name="com.mrozon.feature_auth.presentation.RegistrationFragment"
  57. android:label="RegistrationFragment" >
  58. <action
  59. android:id="@+id/action_registrationFragment_to_loginFragment"
  60. app:destination="@id/loginFragment"
  61. app:enterAnim="@anim/slide_in_right"
  62. app:exitAnim="@anim/slide_out_left"
  63. app:popEnterAnim="@anim/slide_in_left"
  64. app:popExitAnim="@anim/slide_out_right"/>
  65. </fragment>
  66. <action android:id="@+id/action_global_loginFragment"
  67. app:destination="@id/loginFragment"
  68. app:enterAnim="@anim/slide_in_right"
  69. app:exitAnim="@anim/slide_out_left"
  70. app:popEnterAnim="@anim/slide_in_left"
  71. app:popExitAnim="@anim/slide_out_right"/>
  72. <fragment
  73. android:id="@+id/listPersonFragment"
  74. android:name="com.mrozon.feature_person.presentation.ListPersonFragment"
  75. android:label="@string/list_persons"
  76. tools:layout="@layout/fragment_list_person">
  77. <action
  78. android:id="@+id/action_listPersonFragment_to_editPersonFragment"
  79. app:destination="@id/editPersonFragment"
  80. app:enterAnim="@anim/slide_in_right"
  81. app:exitAnim="@anim/slide_out_left"
  82. app:popEnterAnim="@anim/slide_in_left"
  83. app:popExitAnim="@anim/slide_out_right"/>
  84. </fragment>
  85. <fragment
  86. android:id="@+id/editPersonFragment"
  87. android:name="com.mrozon.feature_person.presentation.EditPersonFragment"
  88. tools:layout="@layout/fragment_edit_person"
  89. android:label="{title}" >
  90. <argument
  91. android:name="title"
  92. app:argType="string" />
  93. <argument
  94. android:name="id"
  95. app:argType="long" />
  96. <action
  97. android:id="@+id/action_editPersonFragment_to_listPersonFragment"
  98. app:destination="@id/listPersonFragment" />
  99. </fragment>
  100. </navigation>