在你的onCreate()中
Matrix matrix = new Matrix();
然后在onDraw
float angle = (float) (System.currentTimeMillis() % ROTATE_TIME_MILLIS) / ROTATE_TIME_MILLIS * 360;matrix.reset();matrix.postTranslate(-source.getWidth() / 2, -source.getHeight() / 2);matrix.postRotate(angle);matrix.postTranslate(centerX, centerY)canvas.drawBitmap(source, matrix, null);invalidate(); // Cause a re-draw
ROTATE_TIME_MILLIS是完整的循环时间,例如2000为2秒。



