Skip to content

Instantly share code, notes, and snippets.

@shanmugasanthosh7
Last active August 6, 2018 10:38
Show Gist options
  • Save shanmugasanthosh7/051f7c9564114f7b26b7d2a65313a723 to your computer and use it in GitHub Desktop.
Save shanmugasanthosh7/051f7c9564114f7b26b7d2a65313a723 to your computer and use it in GitHub Desktop.
Type safe navgraph
<?xml version="1.0" encoding="utf-8"?>
<navigation xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
app:startDestination="@id/typeSafeFragment">
<fragment
android:id="@+id/typeSafeFragment"
android:name="com.aptus.navigatioarchitecture.passdatatypesafe.TypeSafeFragment"
android:label="fragment_type_safe"
tools:layout="@layout/fragment_type_safe" >
<action
android:id="@+id/action_typeSafeFragment_to_passTypeSafeFragment"
app:destination="@id/passTypeSafeFragment" />
</fragment>
<fragment
android:id="@+id/passTypeSafeFragment"
android:name="com.aptus.navigatioarchitecture.passdatatypesafe.PassTypeSafeFragment"
android:label="fragment_pass_type_safe"
tools:layout="@layout/fragment_pass_type_safe" >
<argument
android:name="name"
android:defaultValue="Android"
app:argType="string" />
</fragment>
</navigation>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment