How Do I Link Multiple Activities In Android Navigation Editor?
I'm learning android development and the navigation component, trying to link multiple activities as the document had written. But it seems like it's impossible to create action be
Solution 1:
Since each NavController and navigation graph is contained within a single activity, an <activity>
destination is an exit point from that graph - once you use navigate(R.id.your_activity_destination)
to go to the next activity, that NavController and graph is no longer active (it is on the activity on the back stack, not the newly launched activity).
On your second Activity, you would have a second navigation graph with any additional <activity>
outbound destinations to go to further activities.
Baca Juga
- Viewpager2 Inside A Fragment Leaks After Replacing The Fragment It's In By Navigation Component Navigate
- Android Navigation Component: Java.lang.illegalstateexception: Unknown Destination During Restore
- After Updating From Room 2.2.6 To 2.3.0 I Get An Error: "you Must Annotate Primary Keys With @nonnull."
Post a Comment for "How Do I Link Multiple Activities In Android Navigation Editor?"