Skip to content

Instantly share code, notes, and snippets.

@prasannajeet
Created September 3, 2018 05:47
Show Gist options
  • Save prasannajeet/fdb4986c171f9fdf32aaf7856d3c3d57 to your computer and use it in GitHub Desktop.
Save prasannajeet/fdb4986c171f9fdf32aaf7856d3c3d57 to your computer and use it in GitHub Desktop.
Navigation Graph of sample welcome app
<?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"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/welcome_nav"
app:startDestination="@id/mainFragment">
<fragment
android:id="@+id/mainFragment"
android:name="com.example.prasa.navsample.ui.main.MainFragment"
android:label="main_fragment"
tools:layout="@layout/main_fragment">
<action
android:id="@+id/action_list_to_detail"
app:destination="@id/detailFragment" />
<action
android:id="@+id/action_main_to_second_activity"
app:destination="@id/secondActivity" />
<action
android:id="@+id/action_mainFragment_to_ageFragment"
app:destination="@id/ageFragment" />
</fragment>
<fragment
android:id="@+id/detailFragment"
android:name="com.example.prasa.navsample.ui.welcome.WelcomeMeFragment"
android:label="fragment_detail"
tools:layout="@layout/fragment_detail">
<argument
android:name="myname"
android:defaultValue="Prasan Pani"
app:argType="string" />
</fragment>
<activity
android:id="@+id/secondActivity"
android:name="com.example.prasa.navsample.ui.welcome.WelcomeMeActivity"
android:label="second_activity"
tools:layout="@layout/activity_second">
<argument
android:name="myname"
android:defaultValue="Prasan Pani"
app:argType="string" />
</activity>
<fragment
android:id="@+id/ageFragment"
android:name="com.example.prasa.navsample.ui.age.AskMyAgeFragment"
android:label="fragment_age"
tools:layout="@layout/fragment_age">
<argument
android:name="myname"
android:defaultValue="Prasan Pani"
app:argType="string" />
<action
android:id="@+id/action_ageFragment_to_welcomeWithAgeFragment"
app:destination="@id/welcomeWithAgeFragment" />
</fragment>
<fragment
android:id="@+id/welcomeWithAgeFragment"
android:name="com.example.prasa.navsample.ui.welcome.WelcomeMeWithAgeFragment"
android:label="fragment_welcome_with_age"
tools:layout="@layout/fragment_welcome_with_age">
<argument
android:name="myname"
android:defaultValue="Prasan Pani"
app:argType="string" />
<argument
android:name="myage"
android:defaultValue="28"
app:argType="integer" />
</fragment>
</navigation>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment