Skip to content

Commit

Permalink
We can't use actions from external graph
Browse files Browse the repository at this point in the history
  • Loading branch information
PStrelchenko committed Aug 15, 2020
1 parent 1da0286 commit a56d211
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
Expand Up @@ -14,7 +14,7 @@ class ProfileContainerFragment : Fragment(R.layout.fragment_profile_container) {
super.onViewCreated(view, savedInstanceState)

fragment_profile_container__button__open_auth_flow.setOnClickListener {
findNavController().navigate(R.id.action__ProfileContainerFragment__to__AuthFlow)
findNavController().navigate(R.id.action__MainFragment__to__AuthFlow)
}
}

Expand Down
10 changes: 9 additions & 1 deletion app/src/main/res/navigation/app_nav_graph.xml
Expand Up @@ -21,6 +21,14 @@
<fragment
android:id="@+id/MainFragment"
android:name="com.aaglobal.jnc_playground.ui.main.MainFragment"
tools:layout="@layout/fragment_main" />
tools:layout="@layout/fragment_main">

<action
android:id="@+id/action__MainFragment__to__AuthFlow"
app:destination="@id/auth__nav_graph" />

</fragment>

<include app:graph="@navigation/auth__nav_graph" />

</navigation>
10 changes: 2 additions & 8 deletions app/src/main/res/navigation/profile__nav_graph.xml
Expand Up @@ -8,14 +8,8 @@
<fragment
android:id="@+id/ProfileContainerFragment"
android:name="com.aaglobal.jnc_playground.ui.tabs.profile.ProfileContainerFragment"
tools:layout="@layout/fragment_profile_container">
tools:layout="@layout/fragment_profile_container" />

<action
android:id="@+id/action__ProfileContainerFragment__to__AuthFlow"
app:destination="@id/auth__nav_graph" />

</fragment>

<include app:graph="@navigation/auth__nav_graph" />
<include app:graph="@navigation/app_nav_graph"/>

</navigation>

0 comments on commit a56d211

Please sign in to comment.