请建议我这里的答案是我的代码。
Rotate Animation rotate = new Rotate Animation(0, 360, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
rotate.setInterpolator(new LinearInterpolator());
rotate.setRepeatMode(Animation.INFINITE);
rotate.computeDurationHint();
rotate.setRepeatCount(Animation.INFINITE);
rotate.setDuration(durationsecs);
rotate.setStartOffset(-1);
rotate.setFillAfter(true);
mIV_BloodPumpSpeed.startAnimation(rotate);
答案 0 :(得分:0)
private RotateAnimation setRotatedAnimation(Context context, float pivotX,
float pivotY, int duration) {
RotateAnimation rotated = new RotateAnimation(0, 360,
Animation.RELATIVE_TO_SELF, pivotX, Animation.RELATIVE_TO_SELF,
pivotY);
rotated.setInterpolator(context, android.R.anim.cycle_interpolator);
rotated.setRepeatCount(Animation.INFINITE);
rotated.setRepeatMode(Animation.RESTART);
rotated.setDuration(duration);
return rotated;
}