perform Alpha Animation With Custom Time - Android Animation

Android examples for Animation:Alpha Fly Animation

Description

perform Alpha Animation With Custom Time

Demo Code


//package com.java2s;
import android.content.Context;

import android.view.View;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;

public class Main {
    public static void performAlphaAnimationWithCustomTime(int i,
            View view, Context context) {
        Animation animation = AnimationUtils.loadAnimation(context,
                0x7f040008);// w  w  w  .  ja v a 2 s  .c om
        animation.setDuration(i);
        view.startAnimation(animation);
    }
}

Related Tutorials