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 alphaAnimation(View v, float fromAlpha, float toAlpha, long durationMillis,
            boolean fillAfter) {
        AlphaAnimation animation = new AlphaAnimation(fromAlpha, toAlpha);
        animation.setDuration(durationMillis);
        animation.setFillAfter(fillAfter);
        animation.setRepeatMode(Animation.REVERSE);
        v.startAnimation(animation);
    }
}