Skip to content

Instantly share code, notes, and snippets.

@o4oren
Last active May 2, 2020 17:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save o4oren/91a0a13dc01541d66f48d75773511f38 to your computer and use it in GitHub Desktop.
Save o4oren/91a0a13dc01541d66f48d75773511f38 to your computer and use it in GitHub Desktop.
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