Created
December 3, 2018 07:35
-
-
Save itome/c4678134d8ca6b7f07eb3aa4e8eb777b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private fun rotateTextureView() { | |
val orientation = getApplicationOrientation() | |
val viewWidth = textureView.width | |
val viewHeight = textureView.height | |
val matrix = Matrix() | |
matrix.postRotate(- orientation.toFloat(), viewWidth * 0.5F, viewHeight * 0.5F) | |
textureView.setTransform(matrix) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment