如何在Android中旋转图像?

问题描述:

如何在Android上旋转图像?我将使用图像序列动画。但我不知道那个java代码。如何在Android中旋转图像?

试试这个:

RotateAnimation anim = new RotateAnimation(0, 360,0,0); 
anim.setRepeatCount(0); 
anim.setDuration(3000); 
anim.setFillAfter(true); 
ImageView.startAnimation(anim); 
+0

我怎么能停止动画 – khan 2011-03-22 09:31:04

+0

请参考以下链接停止动画:http://*.com/questions/3913750/android-how-to-stop-an-infinite -animation-applied-on-imageview – selladurai 2011-03-22 09:55:54

+0

试试这个anim.cancel(); – 2011-03-22 12:28:26