首页 > 解决方案 > 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?

标签: androidanimationtransitionandroid-motionlayout

解决方案


它已在Constraintlayout-v2.0.0上修复。

Bug修复

  • ...
  • 在某些情况下,MotionLayout 中的跳转到结尾被破坏(链接转换)

推荐阅读