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 {
    private static final int HALF_A_SECOND = 500;
    private static final float VISIBLE = 1.0f;
    private static final float INVISIBLE = 0.0f;

    /**
     * @return A fade out animation from 100% - 0% taking half a second
     */
    public static Animation createFadeoutAnimation() {
        Animation fadeout = new AlphaAnimation(VISIBLE, INVISIBLE);
        fadeout.setDuration(HALF_A_SECOND);
        return fadeout;
    }
}