Skip to content

Instantly share code, notes, and snippets.

@beersheba
Created April 15, 2019 14:46
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 beersheba/8c7bede3461c2ec6a49de483fc2a74d4 to your computer and use it in GitHub Desktop.
Save beersheba/8c7bede3461c2ec6a49de483fc2a74d4 to your computer and use it in GitHub Desktop.
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