Android examples for android.view.animation:Show Animation
animate View And Show
import android.view.View; import android.view.animation.AlphaAnimation; import android.view.animation.Animation; public class Main{ public static void animateViewAndShow(final View viewToAnimate) { Animation anim = new AlphaAnimation(0, 1); anim.setDuration(200);/*from w w w . j a va2 s . c om*/ anim.setAnimationListener(new Animation.AnimationListener() { @Override public void onAnimationStart(Animation animation) { } @Override public void onAnimationEnd(Animation animation) { viewToAnimate.setVisibility(View.VISIBLE); } @Override public void onAnimationRepeat(Animation animation) { } }); viewToAnimate.startAnimation(anim); } }