我在XML中有两个运动布局。一个是父级,一个是它的子级。 当从XML开始动画时,它可以工作。但是,当使用代码动态启动相同的运动布局时,视图不会显示,但日志中的动画显示它已完成。可能的问题是什么? @Override
public void onTransitionCompleted(MotionLayout motionLayout, int currentId) {
switch (currentId) {
case R.id.endHomeLaunch:
我能够对MotionLayout中的视图进行动画化,但不能对位于MotionLayout内部的另一个视图进行动画化。
<androidx.constraintlayout.motion.widget.MotionLayout
...
<com.google.android.material.card.MaterialCardView
...
<androidx.constraintlayout.widget.ConstraintLayout
<!-- I need to animate views that are here when