OnPreferenceChangeListener

Interface definition for a callback to be invoked when the value of this Preference has been changed by the user and is about to be set and/or persisted. This gives the client a chance to prevent setting and/or persisting the value.

Functions

Link copied to clipboard
abstract fun onPreferenceChange(@NonNull preference: Preference, newValue: Any): Boolean
Called when a preference has been changed by the user.