Android: Rotate image in imageview by an angle

前端 未结 25 2637
野趣味
野趣味 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:06

    For Kotlin,

    mImageView.rotation = 90f //angle in float
    

    This will rotate the imageView rather than rotating the image

    Also, though its a method in View class. So you can pretty much rotate any view using it.

提交回复
热议问题