get Previous Tab View Hide Animation - Android Animation

Android examples for Animation:Animation to Hide

Description

get Previous Tab View Hide Animation

Demo Code


//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 mPreviousTabViewHideAnimation = null;

    public static Animation getPreviousTabViewHideAnimation() {
        if (mPreviousTabViewHideAnimation == null) {
            mPreviousTabViewHideAnimation = 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);

            mPreviousTabViewHideAnimation
                    .setDuration(BARS_ANIMATION_DURATION);
        }/*from   w w w .  j  a v a 2s.c  om*/

        return mPreviousTabViewHideAnimation;
    }
}

Related Tutorials