Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Min Activity
package geva.oren.rotaryknobdemo
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import kotlinx.android.synthetic.main.activity_main.*
class MainActivity : AppCompatActivity(), RotaryKnobView.RotaryKnobListener {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
knob.listener = this
textView.text = knob.value.toString()
}
override fun onRotate(value: Int) {
textView.text = value.toString()
}
}
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.