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.

C#
[Android.Runtime.Register("setDefaultValue", "(Ljava/lang/Object;)V", "GetSetDefaultValue_Ljava_lang_Object_Handler")]
public virtual void SetDefaultValue (Java.Lang.Object? defaultValue);

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

Product Versions
.NET for Android .NET for Android API 34, .NET for Android API 35