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

Sinan Kozak

08/02/2020, 3:17 PM
Hi, is it possible to create shared element transition between one compose to a new compose function that replace previous one? Also i struggle to keep my head around how to animate a view from minimum width to fillMaxSize. Is that kind of animation possible with dev15?
z

Zach Klippenstein (he/him) [MOD]

08/02/2020, 4:06 PM
You could use
WithConstraints
to get the min and max sizes, then use the standard animation APIs to animate between them. There's a layout animation modifier that I think might make it into either dev16 or dev17 that you might want to check out.
For shared element transitions, there's a library that might help: https://kotlinlang.slack.com/archives/CJLTWPH7S/p1586184058144200
s

Sinan Kozak

08/02/2020, 5:13 PM
Those are awesome tips. I will experiment with them now.
4 Views