ValueAnimator默认的插值器是两边慢,中间快

ValueAnimator源码如下:

// The time interpolator to be used if none is set on the animation
private static final TimeInterpolator sDefaultInterpolator =
new AccelerateDecelerateInterpolator();

@Override
public void setInterpolator(TimeInterpolator value) {
if (value != null) {
mInterpolator = value;
} else {
mInterpolator = new LinearInterpolator();
}
}

如果设置为空,又变为LinearInterPolator线性插值器

你可能感兴趣的:(ValueAnimator默认的插值器是两边慢,中间快)