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

nuhkoca

04/28/2022, 5:11 PM
Hello! How can I apply
depth
animation to my component, similar to
DepthPageTransformer
in
ViewPager
👀 1
c

Chris Sinco [G]

04/28/2022, 5:34 PM
A combination of animating scale and alpha modifiers should do it
n

nuhkoca

04/28/2022, 5:48 PM
Thanks! If you don't mind could you share a minimal code piece?
c

Chris Sinco [G]

04/29/2022, 1:40 AM
Are you looking specifically for the same animation and behavior in a paging kind of component? Or just the effect in isolation around scale + fading?
n

nuhkoca

04/29/2022, 2:21 AM
Actually same animation by using scaleIn + fading combination
c

Chris Sinco [G]

04/30/2022, 3:33 AM
I played around with the Pager library from Accompanist but that doesn't quite do the same thing, since the DepthPageTransformer has the items stacked on top of each other. So still looking into it.
Might be worth giving this library a try and see if you can tweak the transitions: https://github.com/theapache64/twyper cc @theapache64
👍 1
yes black 1
n

nuhkoca

05/02/2022, 12:42 PM
thank you. will take a look 🙂
6 Views