https://kotlinlang.org logo
#compose
Title
# compose
s

Shakil Karim

05/31/2021, 4:27 PM
m

Michal Klimczak

05/31/2021, 4:38 PM
is it the missing piece for Lazy Column/Row animations?
s

Shakil Karim

05/31/2021, 5:52 PM
I think it's related to Screen Animations which is based on new changes on AnimateVisibility child animations introduce in beta 08.
d

Doris Liu

05/31/2021, 5:59 PM
is it the missing piece for Lazy Column/Row animations?
This is a more generic container that performs a
ContentTransform
when its content changes. More specifically it'll animate in the new content and animate out the previous content using customizable enter/exit transitions. What I'm particularly excited about is the support for a
SizeTransform
(also customizable) to automatically kick off a size animation when the content changes. Aside from these customization support, it is somewhat similar to
Crossfade
. One concept employed in
AnimatedContent
that could be helpful for Lazy Column/Row animations is the ability to define enter/exit transitions for children at the parent level. Meanwhile, the children can access an
AnimatedVisibilityScope
to add any additional enter/exit animations (e.g. on color, corner radius, etc) local to that child.
c

Colton Idle

05/31/2021, 6:10 PM
Doris, this got me thinking... If I use single activity, multiple fragments, but each fragment is just a Composable (we're doing this because we're not quite ready to jump into pure compose app), do you know if the material transformations that work with fragments (https://material.io/blog/android-material-motion) would still work in our scenario?
d

Doris Liu

05/31/2021, 7:07 PM
It should still work in theory, since the transformations (fade, slide, etc) can still be done on the
ComposeView
in your fragments. @Ian Lake can probably give you more details when he's back from vacation. 🙂
c

Colton Idle

05/31/2021, 7:09 PM
In that case... I hope Ian doesn't get back to me for a longggg time. Well deserved vacation!
😀 1
z

Zach Klippenstein (he/him) [MOD]

06/01/2021, 12:46 PM
Is this api something that might support shared element transitions in the future?
d

Doris Liu

06/02/2021, 6:41 PM
This API is intended to be one of the APIs that support shared element in the future. 😛
🎉 5
3 Views