Android examples for Animation:Animation to Show
get Next Tab View Show Animation
//package com.java2s; import android.view.animation.Animation; import android.view.animation.TranslateAnimation; public class Main { private static final int BARS_ANIMATION_DURATION = 150; private static Animation mNextTabViewShowAnimation = null; public static Animation getNextTabViewShowAnimation() { if (mNextTabViewShowAnimation == null) { mNextTabViewShowAnimation = new TranslateAnimation( Animation.RELATIVE_TO_SELF, 1.0f, Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 0.0f); mNextTabViewShowAnimation.setDuration(BARS_ANIMATION_DURATION); }// w w w .ja va2s.co m return mNextTabViewShowAnimation; } }