Freigeben über


Preference.GetPersistedInt(Int32) Method

Definition

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

[Android.Runtime.Register("getPersistedInt", "(I)I", "GetGetPersistedInt_IHandler")]
protected virtual int GetPersistedInt (int defaultReturnValue);
[<Android.Runtime.Register("getPersistedInt", "(I)I", "GetGetPersistedInt_IHandler")>]
abstract member GetPersistedInt : int -> int
override this.GetPersistedInt : int -> int

Parameters

defaultReturnValue
Int32

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 int if this Preference is persistent.

Java documentation for android.preference.Preference.getPersistedInt(int).

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