Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- val matrix = Matrix()
- matrix.postRotate(90F)
- val bitmapOrg = (mainImage.drawable as BitmapDrawable).bitmap
- val scaledBitmap = Bitmap.createScaledBitmap(bitmapOrg, bitmapOrg.width, bitmapOrg.height, true)
- val rotatedBitmap =
- Bitmap.createBitmap(scaledBitmap, 0, 0, scaledBitmap.width, scaledBitmap.height, matrix, true)
- mainImage.setImageBitmap(rotatedBitmap)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement