Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.view.View;

import android.view.animation.AlphaAnimation;

public class Main {
    private static final int duration_short = 300;

    public static void animShow(View view) {
        view.startAnimation(getaAlphaAnimation(0, 1, duration_short));
    }

    public static AlphaAnimation getaAlphaAnimation(int from, int to, int duration) {
        AlphaAnimation alphaAnimationShow = new AlphaAnimation(from, to);
        alphaAnimationShow.setDuration(duration);
        return alphaAnimationShow;
    }
}