Status Update
Comments
cl...@google.com <cl...@google.com>
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
Author: Clara Fok <
Link:
Add non-reified NavGraphBuilder nested graph DSL
Expand for full commit details
Add non-reified NavGraphBuilder nested graph DSL
Test: ./gradlew navigation:navigation-common:cC
Bug: 382094941
Relnote: "Added non-reified NavGraphBuilder.navigation extention functions to build a nested graph with route from KClass<T>"
Change-Id: Ibf24453e66d69c00d4ffb3abe4dc5a1f3782ad09
Files:
- M
navigation/navigation-common/api/current.txt
- M
navigation/navigation-common/api/restricted_current.txt
- M
navigation/navigation-common/src/androidTest/java/androidx/navigation/NavGraphBuilderTest.kt
- M
navigation/navigation-common/src/main/java/androidx/navigation/NavGraphBuilder.kt
Hash: 94c09a993d68e5c57172c3e3bc418e35ec57f2fc
Date: Tue Dec 03 16:52:10 2024
cl...@google.com <cl...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-main
Author: Clara Fok <
Link:
Add non-reified NavGraph.findNode safe args api
Expand for full commit details
Add non-reified NavGraph.findNode safe args api
Test: ./gradlew navigation:navigation-common:cC
Bug: 382094941
Relnote: "Added non-reified NavGraph.findNode API to find node with KClass<*>"
Change-Id: I54696ee5ce64305386de64654c6ce15f3a1fd741
Files:
- M
navigation/navigation-common/api/current.txt
- M
navigation/navigation-common/api/restricted_current.txt
- M
navigation/navigation-common/src/androidTest/java/androidx/navigation/NavGraphTest.kt
- M
navigation/navigation-common/src/main/java/androidx/navigation/NavGraph.kt
Hash: 3c80f14b77e8f2f84f961b24de924439fc009ad7
Date: Tue Dec 03 13:15:22 2024
na...@google.com <na...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-main
Author: Clara Fok <
Link:
Add non-reified NavDeepLink.Builder.setUriPattern safe args api
Expand for full commit details
Add non-reified NavDeepLink.Builder.setUriPattern safe args api
Test: existing tests
Bug: 382094941
Relnote: "Added non-reified NavDeepLink.Builder.setUriPattern API to add set deepLink Uri pattern with KClass<*>"
Change-Id: Ia47be2a0ac9e2b8ef5def4aa808b939e15259d2a
Files:
- M
navigation/navigation-common/api/current.txt
- M
navigation/navigation-common/api/restricted_current.txt
- M
navigation/navigation-common/src/main/java/androidx/navigation/NavDeepLink.kt
Hash: 92ab76b0551be25fab92d2884a8c0c06a521af41
Date: Tue Dec 03 13:06:15 2024
zy...@gmail.com <zy...@gmail.com> #5
Project: platform/frameworks/support
Branch: androidx-main
Author: Clara Fok <
Link:
Add non-reified NavDestinationBuilder.deepLink safe args api
Expand for full commit details
Add non-reified NavDestinationBuilder.deepLink safe args api
Test: ./gradlew navigation:navigation-common:cC
Bug: 382094941
Relnote: "Added non-reified NavDestinationBuilder.deepLink API to add a deeplink with KClass<*>"
Change-Id: I93281ed88fe3be9e6c68a2d5f16d9e0f335c999d
Files:
- M
navigation/navigation-common/api/current.txt
- M
navigation/navigation-common/api/restricted_current.txt
- M
navigation/navigation-common/src/androidTest/java/androidx/navigation/NavDestinationBuilderTest.kt
- M
navigation/navigation-common/src/main/java/androidx/navigation/NavDestinationBuilder.kt
Hash: 3de22e912b5752790370c40acdc03de4d0985933
Date: Tue Dec 03 12:57:11 2024
Description
Component used: Navigation
Version used: 2.8.5
The attempts to fill in the
NavDestination.fillInLabel
methodlabel
of theNavDestination
with arguments. However, it does this by (in every case butNavType.ReferenceType
) by just callingargs[argName].toString()
- e.g., just directly callingtoString()
on the object in theSavedState
bundle.While this approach works for simple types, a custom
NavType
might not store their class directly in the Bundle - for example, if using the@Serializable
support, it would be stored as aBundle
, which means thetoString()
is unlikely to actually be what is needed.Instead,
fillInLabel
should take into account theNavType
and use itsget
method to give theNavType
control over exactly the object that is synthesized from the arguments. That way, developers could implement a customtoString()
implementation on their object to control how it is displayed in the label.