Search code examples
androidanimationtransitionandroid-motionlayout

Three states continuous animation (MotionLayout)


I'm trying to make a continuous animation from the initial state up to the end state.

Transition graph

The transition from initial to start should be instant, so I set app:clickAction="jumpToEnd" on the OnClick handler.

The transition from start to end should automatically play after the previous transition, so I set app:autoTransition="animateToEnd". However, this does not happen. The overall animation is stuck in the start state and does not play further.

If I remove the jumpToEnd from the initial -> start handler, the animation continues with the start -> end transition, which makes me think that it is not a problem with the ConstraintSets of the states.

How can I implement the desired behaviour, i.e. initial -jumpOnClick-> start -automaticallyAnimate-> end?


Solution

  • It had been fixed on Constraintlayout-v2.0.0.

    Bug Fixes

    • ...
    • jump to end was broken in MotionLayout in some situations (chaining transitions)