1
A
回答
3
可能是ü有助于旋转图像.......
RotateAnimation rotate = new RotateAnimation(180, 360, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
rotate.setDuration(500);
imageview.startAnimation(rotate);
前两个参数为开始和程度的结束。
6
使用矩阵,你可以做到这一点,
喜欢的东西,
img=(ImageView)findViewById(R.id.ImageView01);
Bitmap bmp = BitmapFactory.decodeResource(getResources(), R.drawable.refresh);
// Getting width & height of the given image.
int w = bmp.getWidth();
int h = bmp.getHeight();
// Setting post rotate to 90
Matrix mtx = new Matrix();
mtx.postRotate(90);
// Rotating Bitmap
Bitmap rotatedBMP = Bitmap.createBitmap(bmp, 0, 0, w, h, mtx, true);
BitmapDrawable bmd = new BitmapDrawable(rotatedBMP);
img.setImageDrawable(bmd);
或使用动画
RotateAnimation rAnim = new RotateAnimation(0, 359, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
rAnim.setDuration(1000);
imageview.startAnimation(rAnim);
1
这是帽子我已经做 定时器每隔100micro秒 小时后调用pondraw mthod,W是图像
new CountDownTimer(2000, 100) {
public void onTick(long millisUntilFinished) {
degrees=degrees +(rm.nextFloat()*100);
postInvalidate();
}
public void onFinish() {
}
}.start();
把这个代码中的OnDraw方法的高度和宽度
Matrix m = new Matrix();
m.setRotate(degrees,w/2,h/2);
bmp=BitmapFactory.decodeResource(context.getResources(),R.drawable.wfortune_wheel);
canvas.drawBitmap(bmp, m, pb);
}
相关问题
- 1. android - 图片旋转在图像按钮
- 2. 如何旋转图片框
- 3. 如何旋转png图像Delphi?
- 4. 带旋转图标的旋转轮
- 5. cocos2d轮子旋转像幸运轮
- 6. Android的旋转轮(披萨)
- 7. Android在保存前旋转图片
- 8. 如何在谷歌地图中的android旋转图片,
- 9. 如何在WinForms中旋转图片
- 10. 试图在Java中创建一个旋转的微调轮
- 11. 在图片框中旋转图片
- 12. 如何在中心点上旋转一个android图标?
- 13. 图片在PictureBox中旋转
- 14. 图片旋转:CSS
- 15. 如何使用Canvas在图片周围旋转图片?
- 16. 只允许旋转一个子图
- 17. 如何在Android中旋转图像?
- 18. 旋转PNG文件
- 19. 如何点击图片旋转
- 20. 如何使用jogl旋转图片?
- 21. 使用动画css旋转为轮子
- 22. 当信号微弱时旋转轮子
- 23. ProgressDialog轮不旋转
- 24. Flash as3旋转轮
- 25. 旋转一个瓶子Unity3D
- 26. HTML5中的旋转轮图像(例如轮盘)?
- 27. 使用CameraCaptureSession捕获Android图片将图片旋转到风景
- 28. 如何识别UIPickerView上的轮子旋转动画?
- 29. 搅拌车模型一起旋转车轮转轮
- 30. 在android中旋转图像
+1供引用:“如何在Android中进行平滑的图像旋转?” – cbrulak 2012-08-01 05:42:50