Aracılığıyla paylaş


Preference.ShouldCommit Method

Definition

Returns whether the Preference should commit its saved value(s) in #getEditor().

[Android.Runtime.Register("shouldCommit", "()Z", "GetShouldCommitHandler")]
public virtual bool ShouldCommit ();
[<Android.Runtime.Register("shouldCommit", "()Z", "GetShouldCommitHandler")>]
abstract member ShouldCommit : unit -> bool
override this.ShouldCommit : unit -> bool

Returns

Whether the Preference should commit its saved value(s).

Attributes

Remarks

Returns whether the Preference should commit its saved value(s) in #getEditor(). This may return false in situations where batch committing is being done (by the manager) to improve performance.

If this preference is using PreferenceDataStore this value is irrelevant.

Java documentation for android.preference.Preference.shouldCommit().

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