Android examples for android.animation:Animator
pause Or Stop Animator
//package com.java2s; import android.animation.Animator; import android.annotation.SuppressLint; import android.os.Build; public class Main { @SuppressLint("NewApi") public static void pauseOrStopAnimator(Animator animator) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { animator.pause();//from ww w . j a va 2s .c o m } else { animator.cancel(); } } }