Create Alpha Animation with Accelerate Interpolator - Android Animation

Android examples for Animation:Alpha Fly Animation

Description

Create Alpha Animation with Accelerate Interpolator

Demo Code


//package com.java2s;
import android.view.animation.AccelerateInterpolator;
import android.view.animation.AlphaAnimation;
import android.view.animation.Animation;

public class Main {
    public static Animation inAlphaAnimation() {
        AlphaAnimation alpha = new AlphaAnimation(0.0f, 1.0f);
        alpha.setDuration(1000);/*from   w w  w.  ja  va 2  s . c  om*/
        alpha.setInterpolator(new AccelerateInterpolator());
        return alpha;
    }
}

Related Tutorials