Get the show animation of the bottom bar. - Android Animation

Android examples for Animation:Animation to Show

Description

Get the show animation of the bottom bar.

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 mBottomBarShowAnimation = null;

    /**/*www .ja v  a2  s .  c o  m*/
     * Get the show animation of the bottom bar.
     * @return The animation.
     */
    public static Animation getBottomBarShowAnimation() {
        if (mBottomBarShowAnimation == null) {
            mBottomBarShowAnimation = new TranslateAnimation(
                    Animation.RELATIVE_TO_SELF, 0.0f,
                    Animation.RELATIVE_TO_SELF, 0.0f,
                    Animation.RELATIVE_TO_SELF, 1.0f,
                    Animation.RELATIVE_TO_SELF, 0.0f);

            mBottomBarShowAnimation.setDuration(BARS_ANIMATION_DURATION);
        }

        return mBottomBarShowAnimation;
    }
}

Related Tutorials