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;
import android.view.animation.DecelerateInterpolator;

public class Main {
    public static Animation createAlpha(float fromAlpha, float toAlpha, long duration) {
        Animation animation = new AlphaAnimation(fromAlpha, toAlpha);
        animation.setInterpolator(new DecelerateInterpolator());
        animation.setDuration(duration);

        return animation;
    }
}