Preference.IOnPreferenceChangeListener.OnPreferenceChange Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Called when a Preference has been changed by the user.
[Android.Runtime.Register("onPreferenceChange", "(Landroid/preference/Preference;Ljava/lang/Object;)Z", "GetOnPreferenceChange_Landroid_preference_Preference_Ljava_lang_Object_Handler:Android.Preferences.Preference/IOnPreferenceChangeListenerInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public bool OnPreferenceChange (Android.Preferences.Preference? preference, Java.Lang.Object? newValue);
[<Android.Runtime.Register("onPreferenceChange", "(Landroid/preference/Preference;Ljava/lang/Object;)Z", "GetOnPreferenceChange_Landroid_preference_Preference_Ljava_lang_Object_Handler:Android.Preferences.Preference/IOnPreferenceChangeListenerInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member OnPreferenceChange : Android.Preferences.Preference * Java.Lang.Object -> bool
Parameters
- preference
- Preference
The changed Preference.
- newValue
- Object
The new value of the Preference.
Returns
True to update the state of the Preference with the new value.
- Attributes
Remarks
Called when a Preference has been changed by the user. This is called before the state of the Preference is about to be updated and before the state is persisted.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.