Android examples for android.animation:Animator
Create Animator Set from duration and Interpolator
//package com.java2s; import android.animation.AnimatorSet; import android.support.annotation.NonNull; import android.view.animation.Interpolator; public class Main { @NonNull//from w w w. ja v a 2 s .c o m public static AnimatorSet getAnimatorSet(long duration, Interpolator interpolator) { final AnimatorSet animatorSet = new AnimatorSet(); animatorSet.setDuration(duration); if (interpolator != null) { animatorSet.setInterpolator(interpolator); } return animatorSet; } }