前言
Intepolator是Android动画系统中极其重要的一个组件,能够对动画的实际效果产生很大影响。下面对Android系统内置的几种Intepolator的效果进行演示。
AccelerateDecelerateInterpolator
An interpolator where the rate of change starts and ends slowly but accelerates through the middle.
开始与结束时慢,中间加速。
AccelerateInterpolator
An interpolator where the rate of change starts out slowly and and then accelerates.
开始慢,之后加速。
AnticipateInterpolator
An interpolator where the change starts backward then flings forward.
开始时先后退,然后向前猛冲。
AnticipateOvershootInterpolator
An interpolator where the change starts backward then flings forward and overshoots the target value and finally goes back to the final value.
开始时先后退,然后向前猛冲越过终点,最后再后退到终点位置。
BounceInterpolator
An interpolator where the change bounces at the end.
在结尾处反弹直至停止。
CycleInterpolator
Repeats the animation for a specified number of cycles. The rate of change follows a sinusoidal pattern.
动画会反复多次,速率符合正弦曲线。
DecelerateInterpolator
An interpolator where the rate of change starts out quickly and and then decelerates.
开始时快,之后减速。
LinearInterpolator
An interpolator where the rate of change is constant
速率保持不变。
OvershootInterpolator
An interpolator where the change flings forward and overshoots the last value then comes back.
猛冲越过终点然后返回。