Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

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

public class Main {
    public static Animation getAlpha(float fromAlpha, float toAlpha, long duration) {
        AlphaAnimation animation = new AlphaAnimation(fromAlpha, toAlpha);
        animation.setFillAfter(true);
        animation.setDuration(duration);
        return animation;
    }
}