|
<?xml version="1.0" encoding="utf-8"?> |
|
<navigation xmlns:app="http://schemas.android.com/apk/res-auto" |
|
xmlns:tools="http://schemas.android.com/tools" |
|
xmlns:android="http://schemas.android.com/apk/res/android" |
|
app:startDestination="@id/greatFragment"> |
|
|
|
<!-- Create a fragment destination --> |
|
<fragment |
|
android:id="@+id/myGreatFragment" |
|
android:name="com.example.MyGreatFragment" |
|
android:label="myGreatFragment" |
|
tools:layout="@layout/great_fragment" > |
|
</fragment> |
|
|
|
<!-- Create an activity destination --> |
|
<activity |
|
android:id="@+id/myGreatActivity" |
|
android:name="com.example.MyGreatActivity" |
|
android:label="myGreatActivity" |
|
tools:layout="@layout/great_activity" /> |
|
|
|
<!-- Create a dialog fragment destination --> |
|
<dialog |
|
android:id="@+id/myGreatDialogFragment" |
|
android:name="com.example.MyGreatDialogFragment" |
|
android:label="myGreatDialogFragment" |
|
tools:layout="@layout/great_dialog" /> |
|
|
|
<!-- Create a "nav graph" destination (which allows nested graph navigation) --> |
|
<navigation android:id="@+id/myGreatGraph" |
|
android:label="myGreatGraph" |
|
app:startDestination="@id/dest1Fragment"> |
|
|
|
<fragment |
|
android:id="@+id/dest1Fragment" |
|
android:name="com.example.Dest1Fragment" |
|
android:label="dest1Fragment" |
|
tools:layout="@layout/dest_1" > |
|
</fragment> |
|
|
|
<fragment |
|
android:id="@+id/dest2Fragment" |
|
android:name="com.example.Dest2Fragment" |
|
android:label="dest2Fragment" |
|
tools:layout="@layout/dest_2" > |
|
</fragment> |
|
|
|
</navigation> |
|
</navigation> |