Fixed
Status Update
Comments
wk...@google.com <wk...@google.com> #2
il...@google.com <il...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-main
commit 812fe658e564bb57b0bea0ae79946d04e2b85610
Author: Simon Marquis <contact@simon-marquis.fr>
Date: Tue Dec 19 21:46:01 2023
[GH] Fix regression in dynamic labels with non-string typed arguments
Regression introduced inhttps://github.com/androidx/androidx/commit/76f9009e6cfc1cba5314cad87a6f1923203c54fa Reported in https://issuetracker.google.com/issues/316676794
Test: ./gradlew navigation:navigation-ui:cC
Fixes: 316676794
[AndroidX Navigation 2.6.0 broke dynamic app bar title for non String arguments](https://issuetracker.google.com/issues/316676794 )
This is an imported pull request fromhttps://github.com/androidx/androidx/pull/636 .
Resolves #636
Github-Pr-Head-Sha: f455c6d1e641cc72cc1bd371b1f47b7d87ec8eff
GitOrigin-RevId: 3ad8f763f17acb22678f1a87e183ef4e7dac5a9d
Change-Id: I94b4e28bb847632663be32b11e481d13789e8c1b
M navigation/navigation-common/src/main/java/androidx/navigation/NavDestination.kt
M navigation/navigation-ui/src/androidTest/java/androidx/navigation/ui/NavigationUITest.kt
https://android-review.googlesource.com/2882895
Branch: androidx-main
commit 812fe658e564bb57b0bea0ae79946d04e2b85610
Author: Simon Marquis <contact@simon-marquis.fr>
Date: Tue Dec 19 21:46:01 2023
[GH] Fix regression in dynamic labels with non-string typed arguments
Regression introduced in
Test: ./gradlew navigation:navigation-ui:cC
Fixes: 316676794
[AndroidX Navigation 2.6.0 broke dynamic app bar title for non String arguments](
This is an imported pull request from
Resolves #636
Github-Pr-Head-Sha: f455c6d1e641cc72cc1bd371b1f47b7d87ec8eff
GitOrigin-RevId: 3ad8f763f17acb22678f1a87e183ef4e7dac5a9d
Change-Id: I94b4e28bb847632663be32b11e481d13789e8c1b
M navigation/navigation-common/src/main/java/androidx/navigation/NavDestination.kt
M navigation/navigation-ui/src/androidTest/java/androidx/navigation/ui/NavigationUITest.kt
Description
Navigation Arch component and Safe Args Plugin versions 1.0.0-alpha02, 1.0.0-alpha04
Device: Samsung Galaxy S6
I have an argument for activity or fragment when using Navigation Arch component
<argument
android:name="EXTRA_INTEGER"
app:argType="reference"
android:defaultValue="@integer/integer_value"/>
where @integer/integer_value is: <item name="integer_value" format="integer" type="integer">-1</item>
When it navigates with code:
NavHostFragment.findNavController(this).navigate(R.id.action_openFragment)
the value of arguments or intent extra becomes equal -1 (arguments.getInt("EXTRA_INTEGER") or intent.getIntExtra("EXTRA_INTEGER"))
When I use Safe Args plugin generated class
NavHostFragment.findNavController(this).navigate(MyFragmentDirections.actionOpenFragment())
it turns out to be equal reference itself (e.g. 2131296267)
It is an inconsistent behavior and should be fixed in one or another way