0
我正在开发一个动画,它必须显示一个更快速地增加其尺寸的视图。我想达到你在汽车出现时看到的效果。即将到来的运动速度缓慢,但车辆越近,车辆对您的视野越快。如何以越来越快的速度创建ScaleX ObjectAnimator?
使用的ScaleX与ObjectAnimator,你有插值的一些可能性:
AccelerateDeccelerateInterpolator (default) -> very slow when the animation is close to finish...
AccelerateInterpolator -> Also slowing when the ScaleX is too much huge.
LinearInterpolator -> Even more slower when the ScaleX is too much huge.
FastOutSlowInInterpolator -> Still slow at the end.
的scaleX动画怎样才能随着时间的增加规模速度的效果?
我的示例代码:
scaleX = ObjectAnimator.ofFloat(view, "scaleX", 0.1f, 20f);
scaleX.setDuration(10000);
scaleX.setInterpolator(new AccelerateInterpolator());
scaleX.start();
谢谢