Code example for AnimationSet

Methods: addAnimation, setRepeatCount

0
 
        Animation fadeIn = new AlphaAnimation(0, 1);
        fadeIn.setInterpolator(new DecelerateInterpolator()); // add this
        fadeIn.setDuration(fadeInDuration);
 
        AnimationSet animation = new AnimationSet(false);
        animation.addAnimation(fadeIn);
        animation.setRepeatCount(1);
        view.setAnimation(animation);
    } 
     
    public static boolean isExternalStorageRemovable() { 
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD) {
            GingerbreadOrHigherUtils.isExternalStorageRemovable(); 
        } 
        return true; 
    } 
 
    public static File getExternalCacheDir(Context context) {
        if (hasExternalCacheDir()) { 
            return context.getExternalCacheDir();