安卓(Android) 怎么获取下一个选项卡视图(View)隐藏动画(Animation)

2019年10月16日23:11:52安卓(Android) 怎么获取下一个选项卡视图(View)隐藏动画(Animation)已关闭评论 191 664字阅读2分12秒

1.简介

安卓(Android) 怎么获取下一个选项卡视图(View)隐藏动画(Animation)?——请看下文。

2.示例代码

/**
 * 版权所有 编程十万个怎么办(www.tah1986.com)
 */



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);
        }

        return mNextTabViewHideAnimation;
    }
}

 
编程十万个怎么办