如何反转Android中Accelerate Interpolator的加速度

San*_*ndy 2 animation android textview android-animation

我在我的应用程序中的TextView上使用了2个动画.

第一个完成,然后我更改TextView的文本,然后我开始第二个.我想对整个序列使用Accelerate Interpolator效果,但是如果我单独应用它就不起作用,因为速度将在每个动画上重新开始.

我需要反转第二个动画,即.让它快速启动并缓慢结束.

有没有办法做到这一点?

谢谢!

gho*_*555 8

用一个DecelerateInterpolator():

内插器,其中变化率快速开始然后减速.

    animation.setInterpolator(new DecelerateInterpolator());
    animation.setDuration(300L);
    v.startAnimation(animation);
Run Code Online (Sandbox Code Playgroud)