3

RotateAnimation インスタンスの回転速度を下げるにはどうすればよいですか。次のコード スニペットを使用してアニメーションを実行しています。

rotateAnimation = new RotateAnimation(currentRotation, currentRotation + (360 * 5), Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
currentRotation = (currentRotation + (360 * 5));
rotateAnimation.setDuration(10000);
rotateAnimation.setInterpolator(new LinearInterpolator());
rotateAnimation.setRepeatCount(Animation.INFINITE);
rotateAnimation.setRepeatMode(Animation.INFINITE);
rotateAnimation.setFillEnabled(true);
rotateAnimation.setFillAfter(true);
rotateAnimation.setAnimationListener(animationInListener);
recordRingImageView.startAnimation(rotateAnimation);
4

2 に答える 2

8

速度=距離/時間なので、持続時間を増やします

rotateAnimation.setDuration(30000);
于 2013-10-29T13:16:25.403 に答える
1

アニメーションの継続時間を増やすだけです。デュレーションはアニメーションを実行する時間です。デュレーションを長くすると、アニメーションが完了するまでの時間が長くなります。つまり、アニメーションの速度が低下します。

于 2013-10-29T13:16:16.590 に答える