Fade In Animation - Android Animation

Android examples for Animation:Fade Animation

Description

Fade In Animation

Demo Code


//package com.java2s;
import android.animation.ObjectAnimator;
import android.widget.ImageView;

public class Main {
    private static final int FADE_IN_DURATION = 500;

    public static void FadeInAnimation(final ImageView imageView) {
        ObjectAnimator fade = ObjectAnimator.ofFloat(imageView, "alpha",
                0.0f, 1.0f);//from  ww  w .j a v a 2  s  . c  om
        fade.setDuration(FADE_IN_DURATION);
        fade.start();
    }
}

Related Tutorials