Skip to content

Instantly share code, notes, and snippets.

@ValeryPonomarenko
Last active February 1, 2019 07:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ValeryPonomarenko/76790532a4d9eea3f25130085d2e4d96 to your computer and use it in GitHub Desktop.
Save ValeryPonomarenko/76790532a4d9eea3f25130085d2e4d96 to your computer and use it in GitHub Desktop.
Navigation in Multi-Module Projects
<?xml version="1.0" encoding="utf-8"?>
<navigation xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/nav_graph"
app:startDestination="@id/questionsFragment">
<fragment
android:id="@+id/questionsFragment"
android:name="me.vponomarenko.modular.navigation.questions.QuestionsFragment"
android:label="QuestionsFragment">
<action
android:id="@+id/action_questionsFragment_to_questionFragment"
app:destination="@id/questionFragment" />
</fragment>
<fragment
android:id="@+id/questionFragment"
android:name="me.vponomarenko.modular.navigation.question.QuestionFragment"
android:label="QuestionFragment">
<action
android:id="@+id/action_questionFragment_to_wrongAnswerFragment"
app:destination="@id/wrongAnswerFragment" />
<action
android:id="@+id/action_questionFragment_to_rightAnswerFragment"
app:destination="@id/rightAnswerFragment"
app:popUpTo="@+id/questionsFragment" />
</fragment>
<fragment
android:id="@+id/wrongAnswerFragment"
android:name="me.vponomarenko.modular.navigation.result.wrong.WrongAnswerFragment"
android:label="WrongAnswerFragment" />
<fragment
android:id="@+id/rightAnswerFragment"
android:name="me.vponomarenko.modular.navigation.result.right.RightAnswerFragment"
android:label="RightAnswerFragment" />
</navigation>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment