有没有办法在执行时减慢翻译动画的速度?

is there a way to slow down translate animation while its being executed?

如何控制动画的速度?翻译动画从下到上,我想在动画执行期间放慢动画速度。我怎样才能做到这一点?这是我拥有的:

public void SlideToAbove() {

    Animation slide = null;
    slide = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 0.0f,
            Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF,
            0.0f, Animation.RELATIVE_TO_SELF, 0.0f);

    slide.setDuration(300);
    slide.setFillAfter(true);
    slide.setFillEnabled(true);
    toolBar.startAnimation(slide);

    final Animation finalSlide = slide;
    slide.setAnimationListener(new Animation.AnimationListener() {


        public void onAnimationStart(Animation animation) {
        }


        public void onAnimationRepeat(Animation animation) {
        }


        public void onAnimationEnd(Animation animation) {


            CoordinatorLayout.LayoutParams lp = new CoordinatorLayout.LayoutParams(
                    toolBar.getWidth(), toolBar.getHeight());
            lp.setMargins(0, 0, 0, 0);
            appBarLayout.setLayoutParams(lp);
            finalSlide.setFillAfter(true);

        }

    });

试试这个,

slide =new TranslateAnimation(-100f, 0f, 0f, 0f);
slide.setDuration(600);