Fixed
Status Update
Comments
il...@google.com <il...@google.com>
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit f0dc0968ae703e34aba39b2c6c836077c340d2a5
Author: Jeremy Woods <jbwoods@google.com>
Date: Wed Sep 01 15:34:41 2021
Make argument default params last
When generating an argument in kotlin from safe args, default parameters
should always come after none defaults in the argument's constructor.
RelNote: "When generating arguments, safe args now puts parameters
without default values before those with default values."
Test: ./gradlew --rerun-tasks
navigation:navigation-safe-args-generator:test
Bug: 198493585
Change-Id: I8970968c48deb3a1437437df9a3db696ed497372
M navigation/navigation-safe-args-generator/src/main/kotlin/androidx/navigation/safe/args/generator/kotlin/KotlinNavWriter.kt
M navigation/navigation-safe-args-generator/src/test/test-data/expected/kotlin_nav_writer_test/MainFragmentArgs.kt
https://android-review.googlesource.com/1816980
Branch: androidx-main
commit f0dc0968ae703e34aba39b2c6c836077c340d2a5
Author: Jeremy Woods <jbwoods@google.com>
Date: Wed Sep 01 15:34:41 2021
Make argument default params last
When generating an argument in kotlin from safe args, default parameters
should always come after none defaults in the argument's constructor.
RelNote: "When generating arguments, safe args now puts parameters
without default values before those with default values."
Test: ./gradlew --rerun-tasks
navigation:navigation-safe-args-generator:test
Bug: 198493585
Change-Id: I8970968c48deb3a1437437df9a3db696ed497372
M navigation/navigation-safe-args-generator/src/main/kotlin/androidx/navigation/safe/args/generator/kotlin/KotlinNavWriter.kt
M navigation/navigation-safe-args-generator/src/test/test-data/expected/kotlin_nav_writer_test/MainFragmentArgs.kt
vi...@gmail.com <vi...@gmail.com> #3
This has been fixed internally and will be available in the Navigation 2.4.0-alpha09
release.
il...@google.com <il...@google.com> #4
Problem as a result of this in alpha09, it will now generate broken code when nullable parameters are before non-nullable parameters in the navigation resource file.
vi...@gmail.com <vi...@gmail.com> #5
Re
In the future, please always file regressions as new bugs with a sample project that reproduces your issue rather than commenting on issues already marked as fixed - that way we can properly track those fixes for the next release.
Description
Version used: 2.1.0-alpha04
Currently if you're writing a custom navigator that has a NavHost that can be defined in XML, there's no way to use the same app:navGraph that NavHostFragment is able to use since that attribute is defined in navigation-fragment.
Besides making it hard to pick another name for same functionality (fracturing how to use different navigators), it also makes it hard for Android Studio to fill in the 'Hosts' panel in the Navigation Editor correctly for custom navigators.