[NavigationAdvancedSample] How to use root graph and global action?
See original GitHub issueI am trying to extend the [NavigationAdvancedSample] repo with the global action/destination like this: `app_navigation.xml <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/app_navigation" app:startDestination="@id/home">
<include app:graph="@navigation/home" />
<include app:graph="@navigation/list" />
<include app:graph="@navigation/form" />
<action android:id="@+id/action_open_detail"
app:destination="@id/nav_detail"/>
<fragment android:id="@+id/nav_detail"
android:name="com.example.android.navigationadvancedsample.detail.Detail"
android:label="Detail"
tools:layout="@layout/fragment_detail"/>
</navigation>`
I’m looking for the solution to navigate to nav_detail by action action_open_detail from home/list or form. But It’s doesn’t working. Have any suggest to use this functions like up with [NavigationAdvancedSample]?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:5
- Comments:5
Top Results From Across the Web
Menu & Global Actions - Getting Started With ... - YouTube
In this part, we will connect an options menu to our navigation graph so we can navigate to destinations via menu items, ...
Read more >Global actions - Android Developers
You can use a global action to create a common action that multiple ... From the Graph Editor, click on a destination to...
Read more >Android Jetpack Navigation, BottomNavigationView with ...
You can handle back action using popUpTo property in action tag. ... the navigation xml graph into one for each bottom navigation item, ......
Read more >Support multiple back stacks for Bottom tab navigation
Check out NavigationExtensions.kt in the NavigationAdvancedSample. ... back stacks using a single NavHostFragment / navigation graph / FragmentManager, yes.
Read more >Trying to understand the appeal of navigation components
You can still put those fragments in the nav graph. ... You can create Global Actions to navigate to the Profile graph.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@yusufceylan
@yusufceylan That’s to make
include
more usefull with me to reuse action and fragment from global destination instead of define on each navigation. It’s duplicate code. 😦(