2

我正在创建一个 Android 小部件。这个小部件上有一个 ImageView。我想在 ImageView 中旋转图像 - 有什么方法可以做到这一点(无需在 Photoshop 等桌面照片编辑器中手动创建新图像并将它们包含在应用程序中)?

4

1 回答 1

0

There is no direct way to do this for an ImageView within a RemoteViews. RemoteViews in general is very limiting.

If your images can be a static resource, you can make a LevelListDrawable in resource, and set each rotation as a level, then use RemoteViews to invoke ImageView.setImageLevel() with the appropriate index for 0/90/180/270 whatever.

If you are in a situation where you are drawing the image, you must re-draw it and re-send it to the RemoteViews.

于 2011-10-21T13:45:40.187 回答