get Alpha Animation and fill after - Android Animation

Android examples for Animation:Alpha Fly Animation

Description

get Alpha Animation and fill after

Demo Code


//package com.java2s;
import android.view.animation.AlphaAnimation;
import android.view.animation.Animation;

public class Main {
    public static Animation getAplhaAnimation(float fromAlpha, float toAlpha) {
        AlphaAnimation alphaAnimation = new AlphaAnimation(fromAlpha,
                toAlpha);/*w  w  w. j  a va2 s.co  m*/
        alphaAnimation.setFillAfter(true);
        alphaAnimation.setDuration(0);
        return (alphaAnimation);
    }
}

Related Tutorials