I'm a total noob to Kotlin and programming in general, and I want to make an app. In the app involves a NumberPicker widget. I think I got the NP set up properly, as it works when I test it, but I have no clue how to retrieve the user set value from it, and turn it into a variable/value. I think it has to do something with setOnValueChangedListener and OnvalueChangeListener but I can't figure out the syntax, let alone what each part of the syntax does. My question:
What's the syntax for initializing and retrieving values from a NumberPicker and what does each part of the syntax do?
Use
OnValueChangedListenerJava:
Kotlin: