Java tutorial
//package com.java2s; //License from project: Apache License import android.view.View; import android.view.animation.AlphaAnimation; public class Main { public static void fadeToVisible(final View view, int startOffset, int duration) { int visibility = view.getVisibility(); if (visibility != View.VISIBLE) { AlphaAnimation anim = new AlphaAnimation(0, 1); anim.setDuration(duration); anim.setStartOffset(startOffset); view.setVisibility(View.VISIBLE); view.startAnimation(anim); } } }