Status Update
Comments
nj...@google.com <nj...@google.com>
ti...@google.com <ti...@google.com> #2
Yes, we plan on supporting scale as a built-in Enter/ExitTransition. Before that we need to work through the implications of scale on slide/expand/shrink, and explore possibilities of having the scaled size affect parents.
In the meantime, you could workaround this by creating scale enter/exit animation in the content using the AnimatedVisibilityScope#transition
. Here is an example:
so...@gmail.com <so...@gmail.com> #3
Thank you for quick response.
For some use cases, AnimatedVisibility might be helpful. Unfortunately, however, my use case requires both fade and scale transitions. So I will wait for this news.
Have a good day.
ap...@google.com <ap...@google.com> #4
Branch: androidx-main
commit ff127aebdb1da64a186fc78d4d6e76d66dc271b2
Author: Doris Liu <tianliu@google.com>
Date: Tue Jul 27 14:27:30 2021
Introduce Scale Enter/Exit Transition
Also adjusted default spring stiffness for other types of enter/exit
RelNote: "New Enter/Exit transition for scale. It can be used in combination
with other types of Enter/ExitTransitions."
Fixes: 191325593
Test: New test added
Change-Id: I372dade56f09168b8d5450c897550b93dd819e53
M compose/animation/animation-core/api/current.txt
M compose/animation/animation-core/api/public_plus_experimental_current.txt
M compose/animation/animation-core/api/restricted_current.txt
M compose/animation/animation-core/src/commonMain/kotlin/androidx/compose/animation/core/VectorizedAnimationSpec.kt
M compose/animation/animation/api/public_plus_experimental_current.txt
M compose/animation/animation/integration-tests/animation-demos/src/main/java/androidx/compose/animation/demos/AnimationDemos.kt
A compose/animation/animation/integration-tests/animation-demos/src/main/java/androidx/compose/animation/demos/ScaleEnterExitDemo.kt
M compose/animation/animation/integration-tests/animation-demos/src/main/java/androidx/compose/animation/demos/ScreenTransitionDemo.kt
M compose/animation/animation/samples/src/main/java/androidx/compose/animation/samples/AnimatedVisibilitySamples.kt
M compose/animation/animation/src/androidAndroidTest/kotlin/androidx/compose/animation/AnimatedVisibilityTest.kt
M compose/animation/animation/src/commonMain/kotlin/androidx/compose/animation/AnimatedContent.kt
M compose/animation/animation/src/commonMain/kotlin/androidx/compose/animation/AnimatedVisibility.kt
M compose/animation/animation/src/commonMain/kotlin/androidx/compose/animation/EnterExitTransition.kt
Description
New AnimatedContent composable is introduced in compose-animation 1.0.0-beta09. AnimatedContent composable is cool feature and helps to implement transitions concisely. Thank you very much for that.
But, in EnterExitTransition.kt, TransitionData is limited to fade, slide, and changeSize only. So I can't implement material motions using AnimatedContent.
Therefore, I'd like to ask you one thing. Do you have any plans to supports scale function more?