We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello admin How to change rotation image view? Thanks
The text was updated successfully, but these errors were encountered:
Hello. Because the library does not support rotation. But if you want to rotate the image. You can do the following
I use kotlin
`
private var currentAngle = 0.0f private fun rotateByAngle() { if (currentAngle == -270f) { currentAngle = 0f } else { currentAngle += -90f } val viewState = cropViewImage.saveState() cropViewImage.restoreState(viewState) val bitmap = cropViewImage.viewBitmap.rotate(-90f) cropViewImage.setImageBitmap(bitmap) }
fun Bitmap.rotate(degrees: Float): Bitmap { val matrix = Matrix().apply { postRotate(degrees) } return Bitmap.createBitmap(this, 0, 0, width, height, matrix, true) }
Sorry, something went wrong.
No branches or pull requests
Hello admin
How to change rotation image view?
Thanks
The text was updated successfully, but these errors were encountered: