Skip to content

Instantly share code, notes, and snippets.

@Varsha-Kulkarni
Last active June 23, 2020 04:25
Show Gist options
  • Save Varsha-Kulkarni/369a9cb5dbf1672f7a4d49bbb900cfcc to your computer and use it in GitHub Desktop.
Save Varsha-Kulkarni/369a9cb5dbf1672f7a4d49bbb900cfcc to your computer and use it in GitHub Desktop.
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/navigation"
app:startDestination="@+id/nav_home">
<fragment
android:id="@+id/nav_home"
android:name="com.unravelled.sm.ui.HomeFragment"
android:label="@string/menu_home"
tools:layout="@layout/fragment_home" >
<action
android:id="@+id/action_homeFragment_to_addnewitemFragment"
app:destination="@id/nav_add_new_item"
app:enterAnim="@anim/slide_in_right"
app:exitAnim="@anim/slide_out_left"
app:popEnterAnim="@anim/slide_in_left"
app:popExitAnim="@anim/slide_out_right" />
</fragment>
<fragment
android:id="@+id/nav_add_new_item"
android:name="com.unravelled.sm.ui.AddNewItemFragment"
android:label="@string/add_item"
tools:layout="@layout/fragment_add_new_item"/>
<fragment
android:id="@+id/nav_about"
android:name="com.unravelled.sm.ui.AboutFragment"
android:label="@string/menu_about"
tools:layout="@layout/fragment_about" />
<fragment
android:id="@+id/nav_settings"
android:name="com.unravelled.sm.ui.SettingsFragment"
android:label="@string/menu_settings"
tools:layout="@layout/fragment_settings" />
</navigation>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment