get Previous Tab View Show Animation - Android Animation

Android examples for Animation:Animation to Show

Description

get Previous Tab View Show 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 mPreviousTabViewShowAnimation = null;

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

            mPreviousTabViewShowAnimation
                    .setDuration(BARS_ANIMATION_DURATION);
        }/*from   w  w  w  .  j  av a2s . c  o m*/

        return mPreviousTabViewShowAnimation;
    }
}

Related Tutorials