Instantly share code, notes, and snippets.
Last active Dec 23, 2021
Forward destinations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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/nav_graph" | |
app:startDestination="@id/homeFragment"> | |
<fragment | |
android:id="@+id/homeFragment" | |
android:name="com.erikmedina.navigationcomponent.HomeFragment" | |
android:label="fragment_first" | |
tools:layout="@layout/fragment_home"> | |
<action | |
android:id="@+id/action_homeFragment_to_firstFragment" | |
app:destination="@id/firstFragment" /> | |
</fragment> | |
<fragment | |
android:id="@+id/firstFragment" | |
android:name="com.erikmedina.navigationcomponent.FirstFragment" | |
tools:layout="@layout/fragment_first"> | |
<action | |
android:id="@+id/action_firstFragment_to_secondFragment" | |
app:destination="@id/secondFragment" /> | |
</fragment> | |
<fragment | |
android:id="@+id/secondFragment" | |
android:name="com.erikmedina.navigationcomponent.SecondFragment" | |
tools:layout="@layout/fragment_second"> | |
<action | |
android:id="@+id/action_secondFragment_to_thirdFragment" | |
app:destination="@id/thirdFragment" /> | |
</fragment> | |
<fragment | |
android:id="@+id/thirdFragment" | |
android:name="com.erikmedina.navigationcomponent.ThirdFragment" | |
tools:layout="@layout/fragment_third" /> | |
</navigation> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment