Compartir a través de


Preference.SetDefaultValue(Object) Method

Definition

Sets the default value for this Preference, which will be set either if persistence is off or persistence is on and the preference is not found in the persistent storage.

[Android.Runtime.Register("setDefaultValue", "(Ljava/lang/Object;)V", "GetSetDefaultValue_Ljava_lang_Object_Handler")]
public virtual void SetDefaultValue (Java.Lang.Object? defaultValue);
[<Android.Runtime.Register("setDefaultValue", "(Ljava/lang/Object;)V", "GetSetDefaultValue_Ljava_lang_Object_Handler")>]
abstract member SetDefaultValue : Java.Lang.Object -> unit
override this.SetDefaultValue : Java.Lang.Object -> unit

Parameters

defaultValue
Object

The default value.

Attributes

Remarks

Sets the default value for this Preference, which will be set either if persistence is off or persistence is on and the preference is not found in the persistent storage.

Java documentation for android.preference.Preference.setDefaultValue(java.lang.Object).

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.

Applies to