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

public class Main {

    public static void setAlphaInAnimation(final View v, final int duration) {
        Animation animation = new AlphaAnimation(0, 1);
        animation.setDuration(duration);
        animation.setRepeatCount(0);
        v.startAnimation(animation);
    }
}