Android tween动画无限循环每个周期之后会停顿一段时间

解决方案:为补间动画加上一个LinearInterpolator插值器即可解决
停顿的原因是:没有为动画手动设置插值器的时候,系统默认是AccelerateDecelerateInterpolator。
具体在源码Animation的816行如下
 /**
     * Gurantees that this animation has an interpolator. Will use
     * a AccelerateDecelerateInterpolator is nothing else was specified.
     */
    protected void ensureInterpolator() {
        if (mInterpolator == null) {
            mInterpolator = new AccelerateDecelerateInterpolator();
        }
    }

猜你喜欢

转载自blog.csdn.net/sinat_21693123/article/details/79460744