Last active
May 2, 2020 17:08
-
-
Save o4oren/91a0a13dc01541d66f48d75773511f38 to your computer and use it in GitHub Desktop.
rotate knob
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 setKnobPosition(angle: Float) { | |
val matrix = Matrix() | |
knobImageView.scaleType = ScaleType.MATRIX | |
matrix.postRotate(angle, width.toFloat() / 2, height.toFloat() / 2) | |
knobImageView.imageMatrix = matrix | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment