Android 为什么在Constraintlayout中为视图提供偏移约束会影响调整动画大小?

Android 为什么在Constraintlayout中为视图提供偏移约束会影响调整动画大小?,android,android-layout,android-studio-3.0,android-constraintlayout,Android,Android Layout,Android Studio 3.0,Android Constraintlayout,我正在尝试使用ConstraintLayout作为根布局来实现调整动画大小 这是我的密码: AdditiveAnimator().targets(waveView).setDuration(2000) .height((waveView.height.toFloat()*1.5f).toInt()) .width((waveView.width.toFloat()*1.5).toInt())

我正在尝试使用
ConstraintLayout
作为根布局来实现调整动画大小

这是我的密码:

 AdditiveAnimator().targets(waveView).setDuration(2000) 
                    .height((waveView.height.toFloat()*1.5f).toInt())
                    .width((waveView.width.toFloat()*1.5).toInt())
                    .setInterpolator( DecelerateInterpolator())
                    .setRepeatCount(Animation.INFINITE)
                    .start()
请注意,这是一个第三方动画库

这是我的XML视图:

<View
    android:id="@+id/wave_view"
    android:layout_width="@dimen/_160sdp"
    android:layout_height="@dimen/_160sdp"
    android:background="@drawable/wave_background"
    app:layout_constraintBottom_toBottomOf="parent"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toTopOf="parent"
    app:layout_constraintVertical_bias="0.35"
    />

这会导致动画不平衡。我的意思是:

现在,当我消除偏差时,结果是:


我应该怎样做才能达到预期的结果。我应该使用另一个根布局吗?

不清楚问题出在哪里。偏移将视图放置在约束之间。对于您的视图,这些垂直约束是
ConstraintLayout
的顶部和底部。偏移将视图放置在这两个约束之间35%的位置。默认值为50%,即中心,这就是删除“偏移”时视图居中的原因。尽管如此,还是不清楚问题出在哪里。@Cheticamp当“偏差”为0.3时,圆的动画不是对称的,但当“偏差”为“无”时则不是对称的