Created
May 2, 2020 17:23
-
-
Save o4oren/ae6a45b2037100a9eaf03c10ac91335f to your computer and use it in GitHub Desktop.
Min Activity
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
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