Anyone have a pointer on how to run multiple motio...
# android
m
Anyone have a pointer on how to run multiple motionlayout transitions sequentially? I.e. after first one ends, trigger second one
d
I haven't used
MotionLayout
yet but I saw the word "sequentially" and I thought Coroutines!! Maybe you can use suspend functions.
😂 1
m
Unfortunately that won’t be the case here 😄
There is a nice part called
Choreographing multi-step animations
which indeed has some coroutine things under the hood 🙂 But in essence it is a callback transformed into a coroutine
m
I actually ran into that before but didn’t quiet get through it! I’ll take another look, choregraphing sounds exactly what I need, thanks!
j
so you can use the motionlayout transitionlistener to see when your transition has finished, and then call the other transition
m
Yep, that’s one option I’m trying out. Wish there was some nice XML way to do it
Like having more than end state and start state for the motion
j
The only thing you could use is keyframes, but they are really meant to streamline/tweak an animation and not have multiple different animations.