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);
最初の二つのパラメータ画像を回転するUに役立つかもしれません。あなたがそれを行うことができマトリックスを使用して
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);
EDIT:この質問で見てもHow to make a smooth image rotation in Android?
1
これは私が 画像の高さと幅が
new CountDownTimer(2000, 100) {
public void onTick(long millisUntilFinished) {
degrees=degrees +(rm.nextFloat()*100);
postInvalidate();
}
public void onFinish() {
}
}.start();
あるWタイマが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);
をこのコードを入れて、すべての100micro秒 時間後pondrawのmthodを呼び出しを行っている帽子です
}
関連する問題
- 1. アンドロイドのタッチで固定ポイントで画像を回転させる方法
- 2. android ndkを使ってアンドロイドで画像を回転させる方法
- 3. アンドロイドで画像をプログラムで回転して回転する方法は?
- 4. onTouchListenerで画像を回転させる方法は?
- 5. ダイヤル画像をその姿勢で回転させる方法。
- 6. 円の経路で画像を回転させる方法
- 7. 画像を連続的に回転させる方法は?
- 8. 画像をアニメーション化して回転させる方法は?
- 9. 画像を上下逆に回転させますが、水平方向に回転させる方法
- 10. タッチで画像を回転させてアンドロイドの点を固定する
- 11. アンドロイドで画像を反転/反転/カールする方法
- 12. アンドロイドで全体の相対レイアウトを回転させる方法
- 13. 画像を回転して画像を保存する方法
- 14. html 5キャンバスで画像を描き、影で回転させる方法
- 15. htmlキャンバスで独立して2つの画像を回転させる方法
- 16. アンドロイドで画像を回転しながら画像のサイズを変更する
- 17. 画像を回転させた角度を推定する方法は?
- 18. ffmpegで画像を回転
- 19. Raphael.jsで画像を回転
- 20. CSSで画像を回転
- 21. javascriptで画像を回転
- 22. アンドロイドで時計回りと反時計回りに画像を回転する方法は?
- 23. PHPで画像を正しく回転させるには?
- 24. CSS3で背景画像を回転させる
- 25. Silverlightで画像を回転させて変換する(
- 26. タップアンドホールドでUIButtonを回転させる方法(指で回転させる - ホールド - 回転)
- 27. IE8のPNG画像の問題(回転と反射)
- 28. 画像の回転
- 29. フォトショップのようにアンドロイドで回転する画像スケーリング
- 30. 画像を回転させた後にUIImageWriteToSavedPhotosAlbumで画像を保存
+1:「Androidで滑らかな画像ローテーションを作成する方法」 – cbrulak