Android examples for android.view.animation:Show Animation
show View with Animation
import android.content.Context; import android.view.View; import android.view.animation.AnimationUtils; public class Main { public static void showView(Context context, View view, int animId) { if (view == null) return;//from w ww . j av a2s .co m if (view.getVisibility() == View.VISIBLE) return; view.setVisibility(View.VISIBLE); view.clearAnimation(); view.startAnimation(AnimationUtils.loadAnimation(context, animId)); } }