Animation fadeInAnimation = new AlphaAnimation(0.0f, 1.0f); fadeInAnimation.setDuration(1000); View viewToAnimate = findView(R.id.view_to_animate); // find the view in your layout viewToAnimate.setAnimation(fadeInAnimation); viewToAnimate.setVisibility(View.VISIBLE);This code sets the animation to a fade in animation, specifies the duration to be 1000ms, finds the view to animate, and sets the view's animation to the fade in animation. Finally, it sets the visibility to visible so the view will show after the animation completes. The package library for this method is in the android.view package.