0
필자는 크기가 점점 더 커지는보기를 보여줘야하는 애니메이션을 개발하고 있습니다. 차가 올 때와 같은 효과를 얻고 싶습니다. 멀리있을 때, 앞으로의 움직임은 느리지 만 차량 근처가 가까울수록 차가 당신의 시야에 더 빠릅니다.점점 더 빠른 속도로 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가 애니메이션은 시간 규모의 속도를 증가의 효과를 얻을 수 있습니다 ObjectAnimator와 scaleX를 사용하는 경우
, 당신은 보간의 몇 가지 가능성이 있습니까?
내 샘플 코드 : https://matthewlein.com/ceaser/Interpolator customInterpolator = PathInterpolatorCompat.create(cpX1,cpX2,cpY1,cpY2)
결과 곡선이 유사합니다 :
scaleX = ObjectAnimator.ofFloat(view, "scaleX", 0.1f, 20f);
scaleX.setDuration(10000);
scaleX.setInterpolator(new AccelerateInterpolator());
scaleX.start();
이