Skip to content

Instantly share code, notes, and snippets.



Last active May 2, 2020
What would you like to do?
rotate knob
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