When my son’s piano teacher told him he should use a metronome to practice timing, I took it as an opportunity to learn Kotlin.
Physical units do not have a “SeekBar View”, and I wanted to mimic the rotary knob an actual unit might have.
The resulting metronome app and it’s rotary knobSo let’s see how we can create a rotary knob.
The view can be completely created in code, but a good reusable View in Android should be created in xml.
The purpose of this function is to calculate the position of the knob in angles, based on the passed coordinates.

Comments to: How I Built an Android Rotary Knob with Kotlin to Help My Son Practice Piano

Your email address will not be published. Required fields are marked *

Attach images - Only PNG, JPG, JPEG and GIF are supported.


Welcome to Typer

Brief and amiable onboarding is the first thing a new user sees in the theme.
Join Typer
Registration is closed.