0%

Android开发 rotate动画 匀速旋转的实现

匀速旋转,就是能过设置加速器android:interpolator,但是在xml中设置:

android:interpolator="@android:anim/linear_interpolator"

发现没有任何效果,还是加速的。 在代码中设置,解决:

        LinearInterpolator lir = new LinearInterpolator();
        rotate.setInterpolator(lir);