android移除动画,android – 如何使用ObjectAnimator删除动画的慢端?
我有這個ObjectAnimator:
cloudAnim2 = ObjectAnimator.ofFloat(cloud2ImageView,"x",500,1000);
cloudAnim2.setDuration(3000);
cloudAnim2.setRepeatCount(ValueAnimator.INFINITE);
cloudAnim2.setRepeatMode(ValueAnimator.RESTART);
cloudAnim2.start();
cloudAnim2.addListener(new AnimatorListener() {
@Override
public void onAnimationCancel(Animator animation) {}
@Override
public void onAnimationEnd(Animator animation) {}
@Override
public void onAnimationRepeat(Animator animation) {}
@Override
public void onAnimationStart(Animator animation) {}
});
如您所見,云將從位置500開始并將動畫到位置1000,然后它將重復動畫.
問題是動畫越來越慢,因為它接近完成.我的意思是,運動的速度并不總是一樣的.
我希望速度變得總是一樣的.如何才能做到這一點?
謝謝
總結
以上是生活随笔為你收集整理的android移除动画,android – 如何使用ObjectAnimator删除动画的慢端?的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: python 多组直方图 画图_pyth
- 下一篇: 火箭技术术语_仿真优化火箭发动机 3D