Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 42d5037be3a80f5ff840eee1f0a74bfb8f287d66
Author: Ben Weiss <benweiss@google.com>
Date: Thu Dec 10 16:20:02 2020
Add factory functions for DynamicNavHostFragment
Bug: 175222619
Test: updateApi and cAT
RelNote: Add factory functions for DynamicNavHostFragment
Change-Id: Icd51523a8f3cc3f93fffc1796c6a270bc28eaede
M navigation/navigation-dynamic-features-fragment/api/current.txt
M navigation/navigation-dynamic-features-fragment/api/public_plus_experimental_current.txt
M navigation/navigation-dynamic-features-fragment/api/restricted_current.txt
M navigation/navigation-dynamic-features-fragment/src/androidTest/java/androidx/navigation/dynamicfeatures/fragment/DynamicFragmentNavigatorDestinationBuilderTest.kt
M navigation/navigation-dynamic-features-fragment/src/androidTest/java/androidx/navigation/dynamicfeatures/fragment/DynamicNavHostFragmentTest.kt
M navigation/navigation-dynamic-features-fragment/src/main/java/androidx/navigation/dynamicfeatures/fragment/DynamicNavHostFragment.kt
M navigation/navigation-fragment/src/main/java/androidx/navigation/fragment/NavHostFragment.java
https://android-review.googlesource.com/1523818
Branch: androidx-master-dev
commit 42d5037be3a80f5ff840eee1f0a74bfb8f287d66
Author: Ben Weiss <benweiss@google.com>
Date: Thu Dec 10 16:20:02 2020
Add factory functions for DynamicNavHostFragment
Bug: 175222619
Test: updateApi and cAT
RelNote: Add factory functions for DynamicNavHostFragment
Change-Id: Icd51523a8f3cc3f93fffc1796c6a270bc28eaede
M navigation/navigation-dynamic-features-fragment/api/current.txt
M navigation/navigation-dynamic-features-fragment/api/public_plus_experimental_current.txt
M navigation/navigation-dynamic-features-fragment/api/restricted_current.txt
M navigation/navigation-dynamic-features-fragment/src/androidTest/java/androidx/navigation/dynamicfeatures/fragment/DynamicFragmentNavigatorDestinationBuilderTest.kt
M navigation/navigation-dynamic-features-fragment/src/androidTest/java/androidx/navigation/dynamicfeatures/fragment/DynamicNavHostFragmentTest.kt
M navigation/navigation-dynamic-features-fragment/src/main/java/androidx/navigation/dynamicfeatures/fragment/DynamicNavHostFragment.kt
M navigation/navigation-fragment/src/main/java/androidx/navigation/fragment/NavHostFragment.java
jb...@google.com <jb...@google.com> #3
I couldn't seem to find the create method in my codebase on the latest Navigation release 2.3.5. Has this change been merged into latest release?
Description
Now that we have
CreationExtras
, we offer a stateless version of severalViewModelProvider.Factory
s. While these stateless versions ensure that the factories are more flexible, if there is code that attempts the use them the same way as the old stateful factories it does not work.For compatibility, instead of breaking in this scenario, we should make CreationExtras the preferred option over the passed in state. That means we can support CreationExtras while still having the old state as a fallback incase none are provided.