Skip to content

Instantly share code, notes, and snippets.

@beersheba
Created Apr 15, 2019
Embed
What would you like to do?
Login navigation graph
<?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/login_nav"
app:startDestination="@id/loginHomeFragment">
<fragment
android:id="@+id/loginHomeFragment"
android:name="me.rankov.kaboom.login.LoginHomeFragment"
android:label="fragment_login_home"
tools:layout="@layout/fragment_login_home">
<action
android:id="@+id/actionHomeToName"
app:destination="@+id/loginNameFragment"
app:enterAnim="@anim/slide_in_right"
app:exitAnim="@anim/slide_out_left"
app:popUpTo="@+id/login_nav"
app:popUpToInclusive="true" />
<action
android:id="@+id/actionHomeToCountry"
app:destination="@+id/loginCountryFragment"
app:enterAnim="@anim/slide_in_right"
app:exitAnim="@anim/slide_out_left"
app:popUpTo="@+id/login_nav"
app:popUpToInclusive="true" />
</fragment>
<fragment
android:id="@+id/loginNameFragment"
android:name="me.rankov.kaboom.login.LoginNameFragment"
android:label="fragment_login_name"
tools:layout="@layout/fragment_login_name">
<action
android:id="@+id/actionNameToCountry"
app:destination="@+id/loginCountryFragment"
app:enterAnim="@anim/slide_in_right"
app:exitAnim="@anim/slide_out_left"
app:popUpTo="@+id/login_nav"
app:popUpToInclusive="true" />
</fragment>
<fragment
android:id="@+id/loginCountryFragment"
android:name="me.rankov.kaboom.login.LoginCountryFragment"
android:label="fragment_login_country"
tools:layout="@layout/fragment_login_country" />
</navigation>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment