get Fade Out Listener - Android Animation

Android examples for Animation:Fade Animation

Description

get Fade Out Listener

Demo Code


//package com.java2s;

import android.view.View;

import android.view.animation.Animation;
import android.view.animation.Animation.AnimationListener;

public class Main {
    private static AnimationListener getFadeOutListener(final View view) {
        final AnimationListener fadeOutListener = new AnimationListener() {

            public void onAnimationEnd(final Animation animation) {
                view.setVisibility(View.INVISIBLE);
            }// w  w w .j  a va2s  .c  om

            public void onAnimationRepeat(final Animation animation) {

            }

            public void onAnimationStart(final Animation animation) {

            }
        };

        return fadeOutListener;
    }
}

Related Tutorials