Stay organized with collections
Save and categorize content based on your preferences.
PreferenceChangeListener
@FunctionalInterface interface PreferenceChangeListener : EventListener
A listener for receiving preference change events.
Summary
Public methods |
abstract Unit |
This method gets called when a preference is added, removed or when its value is changed.
|
Public methods
preferenceChange
abstract fun preferenceChange(evt: PreferenceChangeEvent!): Unit
This method gets called when a preference is added, removed or when its value is changed.
Parameters |
evt |
PreferenceChangeEvent!: A PreferenceChangeEvent object describing the event source and the preference that has changed. |
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,["# PreferenceChangeListener\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nPreferenceChangeListener\n========================\n\n```\n@FunctionalInterface interface PreferenceChangeListener : EventListener\n```\n\n|-----------------------------------------------|\n| [java.util.prefs.PreferenceChangeListener](#) |\n\nA listener for receiving preference change events.\n\nSummary\n-------\n\n| Public methods ||\n|---------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [preferenceChange](#preferenceChange(java.util.prefs.PreferenceChangeEvent))`(`evt:` `[PreferenceChangeEvent](/reference/kotlin/java/util/prefs/PreferenceChangeEvent)!`)` This method gets called when a preference is added, removed or when its value is changed. |\n\nPublic methods\n--------------\n\n### preferenceChange\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun preferenceChange(evt: PreferenceChangeEvent!): Unit\n```\n\nThis method gets called when a preference is added, removed or when its value is changed.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|-------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `evt` | [PreferenceChangeEvent](/reference/kotlin/java/util/prefs/PreferenceChangeEvent)!: A PreferenceChangeEvent object describing the event source and the preference that has changed. |"]]