nimation a = new RotateAnimation(0.0f, 360.0f,
Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF,
0.5f);
a.setRepeatCount(-1);
a.setDuration(1000);
本文介绍了一种使用Android RotateAnimation类创建无限循环旋转动画的方法。通过设置动画的起始角度为0.0f,结束角度为360.0f,并指定重复次数为-1来实现连续旋转效果。此外,还设置了动画相对于对象自身的水平垂直居中点。
nimation a = new RotateAnimation(0.0f, 360.0f,
Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF,
0.5f);
a.setRepeatCount(-1);
a.setDuration(1000);

被折叠的 条评论
为什么被折叠?