Three states continuous animation (MotionLayout)

Viewed 783

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?

2 Answers

It had been fixed on Constraintlayout-v2.0.0.

Bug Fixes

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

If you want to auto animations you must set easy inout in sensxml file layout indicator and no need add constraint layout in main only need in start and end layouts

Related