fade Background Animation - Android Animation

Android examples for Animation:Fade Animation

Description

fade Background Animation

Demo Code


//package com.java2s;

import android.view.animation.AlphaAnimation;
import android.view.animation.Animation;

public class Main {
    public static AlphaAnimation fadeBackgroundAnimation() {
        AlphaAnimation alpha = new AlphaAnimation(0.5f, 0.2f);
        alpha.setRepeatCount(Animation.INFINITE);
        alpha.setRepeatMode(Animation.REVERSE);
        alpha.setDuration(1200);/*from   ww w  .ja v  a 2  s  .  c  om*/
        alpha.setFillAfter(true);
        return alpha;
    }
}

Related Tutorials