these is my animator set in xml, i want convert to java code, but i don't know how to set the "AnimatorSet" in the "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>
First you have to create an AnimatorSet to play animation together, and then add two ObjectAnimator to AnimatorSet, like this :