Create alpha Animation and set duration - Android Animation

Android examples for Animation:Alpha Fly Animation

Description

Create alpha Animation and set duration

Demo Code


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

public class Main {
    public static Animation alphaAnimation() {
        Animation animation = new AlphaAnimation(1.0f, 0.0f);
        animation.setDuration(500);//from  w ww .  j a v  a2s. c  o m

        return animation;
    }
}

Related Tutorials