Rotary knob constructor
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
class RotaryKnobView @JvmOverloads constructor( | |
context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0 | |
) : RelativeLayout(context, attrs, defStyleAttr), GestureDetector.OnGestureListener { | |
private val gestureDetector: GestureDetectorCompat | |
private var maxValue = 99 | |
private var minValue = 0 | |
var listener: RotaryKnobListener? = null | |
var value = 50 | |
private var knobDrawable: Drawable? = null | |
private var divider = 300f / (maxValue - minValue) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment