Fixed
Status Update
Comments
il...@google.com <il...@google.com>
be...@google.com <be...@google.com>
be...@google.com <be...@google.com> #2
Updated the official sample to use 2.4.0-alpha01
in a
On first run the graph gets inflated, replaced and attached correctly. But the navigate call gets swallowed here by the DynamicGraphNavigator.
val includedNav = replaceWithIncludedNav(destination)
val navigator: Navigator<NavDestination> = navigatorProvider[includedNav.navigatorName]
navigator.navigate(includedNav, args, navOptions, navigatorExtras)
When navigate is called the second time round, the included graph has already been replaced with the actual graph. So the graph doesn't have to be re-attached. Navigation then works as intended.
This code used to work before 2.4.0-alpha01
.
be...@google.com <be...@google.com> #3
Thanks for reporting this!
The issue has been fixed internally and is bound to ship with 2.4.0-alpha02
.
ap...@google.com <ap...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-main
commit 17a35dc9d8312e9d2e82399255ebbc1404ee7722
Author: Ben Weiss <benweiss@google.com>
Date: Wed May 26 10:46:31 2021
Upgrade remainder of navigation-dynamic-features-* to V2 API
Bug: 188859835
Test: Tested against sample, gw test & cAT
RelNote: Use V2 Navigation API in navigation-dynamic-features-*
Change-Id: I7785c40969a40b30b34acd6eedd896b44c3200a1
M navigation/navigation-dynamic-features-fragment/src/main/java/androidx/navigation/dynamicfeatures/fragment/DynamicFragmentNavigator.kt
M navigation/navigation-dynamic-features-runtime/api/current.txt
M navigation/navigation-dynamic-features-runtime/api/public_plus_experimental_current.txt
M navigation/navigation-dynamic-features-runtime/api/restricted_current.txt
M navigation/navigation-dynamic-features-runtime/src/main/java/androidx/navigation/dynamicfeatures/DynamicActivityNavigator.kt
M navigation/navigation-dynamic-features-runtime/src/main/java/androidx/navigation/dynamicfeatures/DynamicGraphNavigator.kt
M navigation/navigation-dynamic-features-runtime/src/main/java/androidx/navigation/dynamicfeatures/DynamicIncludeGraphNavigator.kt
M navigation/navigation-dynamic-features-runtime/src/main/java/androidx/navigation/dynamicfeatures/DynamicInstallManager.kt
https://android-review.googlesource.com/1717775
Branch: androidx-main
commit 17a35dc9d8312e9d2e82399255ebbc1404ee7722
Author: Ben Weiss <benweiss@google.com>
Date: Wed May 26 10:46:31 2021
Upgrade remainder of navigation-dynamic-features-* to V2 API
Bug: 188859835
Test: Tested against sample, gw test & cAT
RelNote: Use V2 Navigation API in navigation-dynamic-features-*
Change-Id: I7785c40969a40b30b34acd6eedd896b44c3200a1
M navigation/navigation-dynamic-features-fragment/src/main/java/androidx/navigation/dynamicfeatures/fragment/DynamicFragmentNavigator.kt
M navigation/navigation-dynamic-features-runtime/api/current.txt
M navigation/navigation-dynamic-features-runtime/api/public_plus_experimental_current.txt
M navigation/navigation-dynamic-features-runtime/api/restricted_current.txt
M navigation/navigation-dynamic-features-runtime/src/main/java/androidx/navigation/dynamicfeatures/DynamicActivityNavigator.kt
M navigation/navigation-dynamic-features-runtime/src/main/java/androidx/navigation/dynamicfeatures/DynamicGraphNavigator.kt
M navigation/navigation-dynamic-features-runtime/src/main/java/androidx/navigation/dynamicfeatures/DynamicIncludeGraphNavigator.kt
M navigation/navigation-dynamic-features-runtime/src/main/java/androidx/navigation/dynamicfeatures/DynamicInstallManager.kt
il...@google.com <il...@google.com> #5
This just missed the alpha02 release cut, so this will actually be part of Navigation 2.4.0-alpha03
.
Description
Component used: Navigation Version used: 2.4.0-alpha01 Devices/Android versions reproduced on:
While navigating to a included dynamic graph you need to navigate twice at app startup. So the user would need to click a button twice. But it's not needed for future actions while the app is hot. Feels like it needs that first navigate in order to read the graph so it can navigate later on.
Sample project:https://github.com/davols/navigate-twice-issue