我有一个带有几个 ObjectAnimators 的 AnimatorSet。我看不出它们的持续时间之间的差异。谁能给我解释一下?
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:ordering="together">
<objectAnimator
android:propertyName="translationY"
android:duration="1000"
android:interpolator="@android:interpolator/bounce"
android:repeatCount="3"
android:valueFrom="0.0"
android:valueTo="-600.0"
android:repeatMode="reverse"
android:valueType="floatType"/>
<objectAnimator
android:propertyName="alpha"
android:duration="1000"
android:interpolator="@android:interpolator/linear"
android:repeatCount="3"
android:valueFrom="1.0"
android:valueTo="0.0"
android:repeatMode="reverse"
android:valueType="floatType"
/>
</set>
val rocketAnimatorSet = AnimatorInflater.loadAnimator(this, R.animator.jump_and_blink) as AnimatorSet
val dogeAnimatorSet = AnimatorInflater.loadAnimator(this, R.animator.jump_and_blink) as AnimatorSet
rocketAnimatorSet.setTarget(rocket)
dogeAnimatorSet.setTarget(doge)
val animatorSet = AnimatorSet()
animatorSet.playTogether(rocketAnimatorSet, dogeAnimatorSet)
animatorSet.duration =9000L
animatorSet.start()