Stay organized with collections
Save and categorize content based on your preferences.
OnValueChangeListener
interface OnValueChangeListener
Interface to listen for changes of the current value.
Summary
Public methods |
abstract Unit |
Called upon a change of the current value.
|
Public methods
onValueChange
abstract fun onValueChange(
picker: NumberPicker!,
oldVal: Int,
newVal: Int
): Unit
Called upon a change of the current value.
Parameters |
picker |
NumberPicker!: The NumberPicker associated with this listener. |
oldVal |
Int: The previous value. |
newVal |
Int: The new value. |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# NumberPicker.OnValueChangeListener\n\nAdded in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nOnValueChangeListener\n=====================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/widget/NumberPicker.OnValueChangeListener \"View this page in Java\") \n\n```\ninterface OnValueChangeListener\n```\n\n|--------------------------------------------------------|\n| [android.widget.NumberPicker.OnValueChangeListener](#) |\n\nInterface to listen for changes of the current value.\n\nSummary\n-------\n\n| Public methods ||\n|---------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onValueChange](#onValueChange(android.widget.NumberPicker,%20kotlin.Int,%20kotlin.Int))`(`picker:` `[NumberPicker](/reference/kotlin/android/widget/NumberPicker)!`, `oldVal:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `newVal:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Called upon a change of the current value. |\n\nPublic methods\n--------------\n\n### onValueChange\n\nAdded in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onValueChange(\n picker: NumberPicker!, \n oldVal: Int, \n newVal: Int\n): Unit\n```\n\nCalled upon a change of the current value.\n\n| Parameters ||\n|----------|-----------------------------------------------------------------------------------------------------------------|\n| `picker` | [NumberPicker](/reference/kotlin/android/widget/NumberPicker)!: The NumberPicker associated with this listener. |\n| `oldVal` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): The previous value. |\n| `newVal` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): The new value. |"]]