any simple to understand animation examples yet? :...
# compose
i
any simple to understand animation examples yet? ๐Ÿ™‚ I did some digging but nothing clicked so far, I see the cross fade anim and some infrastructure just need a nudge in the right direction
m
i
aha very nice thanks ๐Ÿ™‚
@matvei examples are very cool though they only show how to animate drawn rectangles on a canvas. Will it be possible to animate a
Container
or
Surface
containing other composables?
maybe animating a custom layout modifier might work... not sure ๐Ÿ™‚
m
What do you mean by "animate `Container`"? Do you want to animate it's bounds or paddings?
I think you can still wrap Container with Transition or put remembered AniamatedFloat nearby and use it's values in modifiers/children to animate whatever you want.
๐Ÿ‘ 1
i
yeh so I have a card editor using
Card{}
(at top of screenie) and I want to animate the whole card and its content as if its being flipped around... I could maybe take a snapshot image of it and rotate that to fake it might work
Been thinking about this further and if animations such as rotation are only available at the draw level rather than rotating any old composable my approach to using high-level composables in this little editor app are not going to work... seems I might have to draw those elements on a canvas instead
Hey @matvei wondering if you (or colleagues) have any more perspective on this, should Compose support high level animations (such as animating containers on on any axis, translation, rotation, etc) seems like this would be something that is not exclusive to my particular use case. Maybe the
Modifier
API could support more than size modifications though also orientation?
m
Hey. Yep, I think it will be useful to have something like that. Modifiers here will be especially useful, as you can just put
Container(modifier = LayoputPadding(10.dp) + RotationX(0.1f) )
. but I'm not sure if it's doable right now I don't know about particular plans, but agree that would be nice to have.
๐Ÿ‘ 1
i
nice ๐Ÿ™‚ yeh something like that would be super cool! ๐Ÿ™‚