Answers for "how to rotate animation an image view in android"

0

android studio rotate imageview

val bitmap =
  binding.image.drawable.toBitmap(
               binding.image.drawable.intrinsicWidth,
               binding.image.drawable.intrinsicHeight
            )
val matrix = Matrix()
matrix.postRotate(90f)
val rotated = 
  Bitmap.createBitmap(
        bitmap,
           	0,
            0,
        binding.image.drawable.intrinsicWidth,
        binding.image.drawable.intrinsicHeight,
        matrix,
        	true
     )
  
binding.image.setImageBitmap(rotated)
Posted by: Guest on July-27-2021

Code answers related to "how to rotate animation an image view in android"

Browse Popular Code Answers by Language