动画效果-文字弹性下落

自己记录一下,以后备用。

动画类:TranslateAnimation平移动画

代码:

/***
     * 启动页动画-文字弹性下落
     * @param
     */
    public static void setSplashAnimator(View view,float fromYDelta){
        TranslateAnimation down = new TranslateAnimation(0, 0, fromYDelta, 0);//位移动画
        down.setFillAfter(true);
        down.setInterpolator(new BounceInterpolator());//弹跳动画,要其它效果的当然也可以设置为其它的值
        down.setDuration(2500);
        view.startAnimation(down);
        down.setAnimationListener(new Animation.AnimationListener() {
            @Override
            public void onAnimationStart(Animation animation) {

            }

            @Override
            public void onAnimationEnd(Animation animation) {

            }

            @Override
            public void onAnimationRepeat(Animation animation) {

            }
        });
    }

 

你可能感兴趣的:(动画系列)