run Fade Out Animation On activity - Android android.view.animation

Android examples for android.view.animation:Fade Animation

Description

run Fade Out Animation On activity

Demo Code

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

public class Main {

  public static Animation runFadeOutAnimationOn(Activity ctx, View target) {
    Animation animation = AnimationUtils.loadAnimation(ctx, android.R.anim.fade_out);
    target.startAnimation(animation);/*  w  ww  . j a v a2  s.co m*/
    return animation;
  }

}

Related Tutorials