Android examples for Animation:Animation to Hide
get Next Tab View Hide 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 mNextTabViewHideAnimation = null; public static Animation getNextTabViewHideAnimation() { if (mNextTabViewHideAnimation == null) { mNextTabViewHideAnimation = new TranslateAnimation( Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 1.0f, Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 0.0f); mNextTabViewHideAnimation.setDuration(BARS_ANIMATION_DURATION); }/* w ww .ja v a 2 s. c o m*/ return mNextTabViewHideAnimation; } }