Skip to content

Instantly share code, notes, and snippets.

@o4oren

o4oren/RotaryKnobView.kt

Last active May 2, 2020
Embed
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
You can’t perform that action at this time.