Compartilhar via


Preference.GetPersistedBoolean(Boolean) Method

Definition

Attempts to get a persisted boolean if this Preference is persistent.

[Android.Runtime.Register("getPersistedBoolean", "(Z)Z", "GetGetPersistedBoolean_ZHandler")]
protected virtual bool GetPersistedBoolean (bool defaultReturnValue);
[<Android.Runtime.Register("getPersistedBoolean", "(Z)Z", "GetGetPersistedBoolean_ZHandler")>]
abstract member GetPersistedBoolean : bool -> bool
override this.GetPersistedBoolean : bool -> bool

Parameters

defaultReturnValue
Boolean

The default value to return if either this Preference is not persistent or this Preference is not present.

Returns

The value from the data store or the default return value.

Attributes

Remarks

Attempts to get a persisted boolean if this Preference is persistent.

Java documentation for android.preference.Preference.getPersistedBoolean(boolean).

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

See also