get Next Tab View Show Animation - Android Animation

Android examples for Animation:Animation to Show

Description

get Next 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 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;
    }
}

Related Tutorials