Android examples for android.animation:Animator Fade
animate View Fade In Animator
//package com.java2s; import android.animation.Animator; import android.animation.ObjectAnimator; import android.view.View; public class Main { public static Animator animViewFadeIn(View paramView) { return animViewFadeIn(paramView, 200L, null); }/*from w w w.j a v a2 s .c o m*/ public static Animator animViewFadeIn(View paramView, long paramLong, Animator.AnimatorListener paramAnimatorListener) { ObjectAnimator localObjectAnimator = ObjectAnimator.ofFloat( paramView, "alpha", 0.0F, 1.0F); localObjectAnimator.setDuration(paramLong); if (paramAnimatorListener != null) localObjectAnimator.addListener(paramAnimatorListener); localObjectAnimator.start(); return localObjectAnimator; } }