Fixed
Status Update
Comments
ti...@google.com <ti...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-master-dev
commit f85de8f1f4a1f025bcd6ae566c9ce3b4c8f1f06c
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Thu Jan 24 16:28:34 2019
Use fully qualified ClassName for action method return names.
Using complete ClassName for action return types helps child direction
classes correctly generate their inherited action method. More precisely
it allows for deep nested direction classes to correctly import the
inner NavDirection class generated in a grandfather direction class.
Bug: 123347762
Test: ./gradlew navigation:navigation-safe-args-gradle-plugin:test \
navigation:navigation-safe-args-generator:test
Change-Id: I62a0b10b33bfe496d930782a7ef0d7269a75df96
M navigation/safe-args-generator/src/main/kotlin/androidx/navigation/safe/args/generator/java/JavaNavWriter.kt
M navigation/safe-args-generator/src/tests/test-data/expected/nav_generator_test/java/nested_overridden_action/InnerSettingsDirections.java
M navigation/safe-args-generator/src/tests/test-data/expected/nav_generator_test/java/nested_overridden_action/InnerSettingsFragmentDirections.java
M navigation/safe-args-generator/src/tests/test-data/expected/nav_generator_test/java/nested_overridden_action/SettingsDirections.java
M navigation/safe-args-generator/src/tests/test-data/expected/nav_generator_test/java/nested_overridden_action/SettingsFragmentDirections.java
M navigation/safe-args-generator/src/tests/test-data/expected/nav_generator_test/kotlin/nested_overridden_action/InnerSettingsDirections.kt
M navigation/safe-args-generator/src/tests/test-data/expected/nav_generator_test/kotlin/nested_overridden_action/InnerSettingsFragmentDirections.kt
M navigation/safe-args-generator/src/tests/test-data/expected/nav_generator_test/kotlin/nested_overridden_action/SettingsDirections.kt
M navigation/safe-args-generator/src/tests/test-data/expected/nav_generator_test/kotlin/nested_overridden_action/SettingsFragmentDirections.kt
M navigation/safe-args-generator/src/tests/test-data/nested_overridden_action_test.xml
M navigation/safe-args-gradle-plugin/src/test/test-data/app-project-kotlin/src/main/res/navigation/nav_nested_test.xml
M navigation/safe-args-gradle-plugin/src/test/test-data/app-project/src/main/res/navigation/nav_nested_test.xml
https://android-review.googlesource.com/885199
https://goto.google.com/android-sha1/f85de8f1f4a1f025bcd6ae566c9ce3b4c8f1f06c
Branch: androidx-master-dev
commit f85de8f1f4a1f025bcd6ae566c9ce3b4c8f1f06c
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Thu Jan 24 16:28:34 2019
Use fully qualified ClassName for action method return names.
Using complete ClassName for action return types helps child direction
classes correctly generate their inherited action method. More precisely
it allows for deep nested direction classes to correctly import the
inner NavDirection class generated in a grandfather direction class.
Bug: 123347762
Test: ./gradlew navigation:navigation-safe-args-gradle-plugin:test \
navigation:navigation-safe-args-generator:test
Change-Id: I62a0b10b33bfe496d930782a7ef0d7269a75df96
M navigation/safe-args-generator/src/main/kotlin/androidx/navigation/safe/args/generator/java/JavaNavWriter.kt
M navigation/safe-args-generator/src/tests/test-data/expected/nav_generator_test/java/nested_overridden_action/InnerSettingsDirections.java
M navigation/safe-args-generator/src/tests/test-data/expected/nav_generator_test/java/nested_overridden_action/InnerSettingsFragmentDirections.java
M navigation/safe-args-generator/src/tests/test-data/expected/nav_generator_test/java/nested_overridden_action/SettingsDirections.java
M navigation/safe-args-generator/src/tests/test-data/expected/nav_generator_test/java/nested_overridden_action/SettingsFragmentDirections.java
M navigation/safe-args-generator/src/tests/test-data/expected/nav_generator_test/kotlin/nested_overridden_action/InnerSettingsDirections.kt
M navigation/safe-args-generator/src/tests/test-data/expected/nav_generator_test/kotlin/nested_overridden_action/InnerSettingsFragmentDirections.kt
M navigation/safe-args-generator/src/tests/test-data/expected/nav_generator_test/kotlin/nested_overridden_action/SettingsDirections.kt
M navigation/safe-args-generator/src/tests/test-data/expected/nav_generator_test/kotlin/nested_overridden_action/SettingsFragmentDirections.kt
M navigation/safe-args-generator/src/tests/test-data/nested_overridden_action_test.xml
M navigation/safe-args-gradle-plugin/src/test/test-data/app-project-kotlin/src/main/res/navigation/nav_nested_test.xml
M navigation/safe-args-gradle-plugin/src/test/test-data/app-project/src/main/res/navigation/nav_nested_test.xml
ti...@gmail.com <ti...@gmail.com> #3
This has been fixed internally and will be available in the next release.
Note that the Kotlin Safe Args plugin (using apply plugin: 'androidx.navigation.safeargs.kotlin') is not affected by this bug, so if you're in a Kotlin only project, consider switching to that as a workaround.
Note that when fixing this issue, we did find another issue, filed ashttps://issuetracker.google.com/issues/123374541 that *does* affect the Kotlin code gen specifically when using a argument name with the same name as the enum class you've set as the default value (in your example app, the android:name="ToolbarType"). Feel free to star that issue to track progress on that issue and note the workaround listed there).
Note that the Kotlin Safe Args plugin (using apply plugin: 'androidx.navigation.safeargs.kotlin') is not affected by this bug, so if you're in a Kotlin only project, consider switching to that as a workaround.
Note that when fixing this issue, we did find another issue, filed as
ap...@google.com <ap...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-main
commit 7e3b52b20e73c397019f474ab15eb8ea64a872d3
Author: Doris Liu <tianliu@google.com>
Date: Thu Sep 29 18:06:42 2022
Fix incorrect interruption animation in AnimatedContent
Bug: 238662479
Test: included
Change-Id: I86bb98800070f4584e30a1d0a4edec274b0c7e5c
A compose/animation/animation/integration-tests/animation-demos/src/main/java/androidx/compose/animation/demos/visualinspection/AnimatedContentWithInterruptions.kt
M compose/animation/animation/src/androidAndroidTest/kotlin/androidx/compose/animation/AnimatedContentTest.kt
M compose/animation/animation/src/commonMain/kotlin/androidx/compose/animation/EnterExitTransition.kt
M compose/animation/animation/src/commonMain/kotlin/androidx/compose/animation/AnimatedContent.kt
M compose/animation/animation/integration-tests/animation-demos/src/main/java/androidx/compose/animation/demos/AnimationDemos.kt
https://android-review.googlesource.com/2239235
Branch: androidx-main
commit 7e3b52b20e73c397019f474ab15eb8ea64a872d3
Author: Doris Liu <tianliu@google.com>
Date: Thu Sep 29 18:06:42 2022
Fix incorrect interruption animation in AnimatedContent
Bug: 238662479
Test: included
Change-Id: I86bb98800070f4584e30a1d0a4edec274b0c7e5c
A compose/animation/animation/integration-tests/animation-demos/src/main/java/androidx/compose/animation/demos/visualinspection/AnimatedContentWithInterruptions.kt
M compose/animation/animation/src/androidAndroidTest/kotlin/androidx/compose/animation/AnimatedContentTest.kt
M compose/animation/animation/src/commonMain/kotlin/androidx/compose/animation/EnterExitTransition.kt
M compose/animation/animation/src/commonMain/kotlin/androidx/compose/animation/AnimatedContent.kt
M compose/animation/animation/integration-tests/animation-demos/src/main/java/androidx/compose/animation/demos/AnimationDemos.kt
ti...@google.com <ti...@google.com>
na...@google.com <na...@google.com> #5
The following release(s) address this bug:
androidx.compose.animation:animation:1.4.0-alpha01
[Deleted User] <[Deleted User]> #6
Why is this not released as a hotfix so stable users can get the bug fix right away?
pe...@gmail.com <pe...@gmail.com> #7
He is mine just saying his time is my time
Description
Jetpack Compose version:
1.2.0-rc03
Jetpack Compose component used:
AnimatedContent
Android Studio Build: 2022.1.1. Canary 7
Kotlin version:
1.7.1
When using
AnimatedContent
to animate between two contents, if you interrupt during the animation and attempt to return to the previous state, the target gets the wrong animation.Given:
When starting from the green screen, starting animation to the red screen and interrupting that animation to return to green the green animation incorrectly does a
slideIn()
transition after the interrupt.Expected:
The Green screen should always be fading. When we go from green to red it should be fading out. When returning back to green, because it is the targetState it should get the entering animation, which is a
fadeIn()
and the Red screen should be fading out.Observed:
On interruption, the Green screen gets the exit transition, which in this case is the
slideOut()
and reverses it so it ends up doing aslideIn()
and the Red screen fades out.Since the targetState is always the final state of the AnimatedContent, it should always receive whatever enter transition in passed into the
transitionSpec
.