Android examples for android.animation:Animator Fade
fade Out AnimatorSet
//package com.java2s; import android.animation.AnimatorSet; import android.animation.ObjectAnimator; import android.view.View; public class Main { public static AnimatorSet fadeOutSet(View v, float x) { AnimatorSet fadeOutSet = new AnimatorSet(); fadeOutSet.playTogether(alfaDisappear(v), translationRight(v, x)); return fadeOutSet; }/*from w w w . j a va 2 s. c o m*/ public static ObjectAnimator alfaDisappear(View v) { return ObjectAnimator.ofFloat(v, "alpha", 1, 0); } public static ObjectAnimator translationRight(View v, float x) { return ObjectAnimator.ofFloat(v, "translationX", 0, x); } }