我想旋转 imageView 的图像,我已经使用矩阵缩放图像但旋转有问题,我正在使用代码...
int previousDegrees = 0;
int degrees = 90;
RotateAnimation animation = new RotateAnimation(previousDegrees,degrees,160,160);
ImageView imageView = (ImageView)findViewById(R.id.imageView);
animation.setDuration(1000);//Set the duration of the animation to 1 sec.
imageView.startAnimation(animation);
它旋转图像一秒钟然后退回到原来的位置..有什么方法可以让图像连续旋转onclick..就像在(0,90.180.270,360)度... 请任何帮助!
最佳答案
像这样设置这些参数:
animation.setFillEnabled(true);
animation.setFillAfter(true);
来自 Android Developers Reference :
If fillAfter is true, the transformation that this animation performed will persist when it is finished.
关于android - 旋转二维图像onclick android,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10875046/