这些是我在 xml 中设置的动画器,我想转换为 java 代码,但我不知道如何在“AnimatorSet”中设置“AnimatorSet”?
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:ordering="sequentially">
<set>
<objectAnimator
android:duration="50"
android:propertyName="scaleX"
android:valueFrom="1.0"
android:valueTo="0.8" />
<objectAnimator
android:duration="50"
android:propertyName="scaleY"
android:valueFrom="1.0"
android:valueTo="0.8" />
</set>
<set>
<objectAnimator
android:duration="50"
android:propertyName="scaleX"
android:valueFrom="0.8"
android:valueTo="1.1" />
<objectAnimator
android:duration="50"
android:propertyName="scaleY"
android:valueFrom="0.8"
android:valueTo="1.1" />
</set>
</set>