Android: Rotate image in imageview by an angle

前端 未结 25 2648
野趣味
野趣味 2020-11-22 06:35

I am using the following code to rotate a image in ImageView by an angle. Is there any simpler and less complex method available.

ImageView iv = (ImageView)f         


        
25条回答
  •  失恋的感觉
    2020-11-22 07:04

    If you're supporting API 11 or higher, you can just use the following XML attribute:

    android:rotation="90"
    

    It might not display correctly in Android Studio xml preview, but it works as expected.

提交回复
热议问题