Animate ImageView to Fade - Android Animation

Android examples for Animation:Fade Animation

Description

Animate ImageView to Fade

Demo Code


//package com.java2s;

import android.view.animation.AlphaAnimation;
import android.view.animation.Animation;

import android.widget.ImageView;

public class Main {
    public static void animaFotoFadeIn(ImageView imageView) {
        Animation animation = new AlphaAnimation(0.0F, 1.0F);
        animation.setDuration(1500);/*  w  w w. j  a v a  2 s  .c om*/
        imageView.setAnimation(animation);
    }
}

Related Tutorials