Condividi tramite


PreferenceManager.PreferenceDataStore Property

Definition

Returns the PreferenceDataStore associated with this manager or null if the default android.content.SharedPreferences are used instead. -or- Sets a PreferenceDataStore to be used by all Preferences associated with this manager that don't have a custom PreferenceDataStore assigned via Preference#setPreferenceDataStore(PreferenceDataStore).

public virtual Android.Preferences.IPreferenceDataStore? PreferenceDataStore { [Android.Runtime.Register("getPreferenceDataStore", "()Landroid/preference/PreferenceDataStore;", "GetGetPreferenceDataStoreHandler", ApiSince=26)] get; [Android.Runtime.Register("setPreferenceDataStore", "(Landroid/preference/PreferenceDataStore;)V", "GetSetPreferenceDataStore_Landroid_preference_PreferenceDataStore_Handler", ApiSince=26)] set; }
[<get: Android.Runtime.Register("getPreferenceDataStore", "()Landroid/preference/PreferenceDataStore;", "GetGetPreferenceDataStoreHandler", ApiSince=26)>]
[<set: Android.Runtime.Register("setPreferenceDataStore", "(Landroid/preference/PreferenceDataStore;)V", "GetSetPreferenceDataStore_Landroid_preference_PreferenceDataStore_Handler", ApiSince=26)>]
member this.PreferenceDataStore : Android.Preferences.IPreferenceDataStore with get, set

Property Value

The PreferenceDataStore associated with this manager or null if none.

Attributes

Remarks

Property getter documentation:

Returns the PreferenceDataStore associated with this manager or null if the default android.content.SharedPreferences are used instead.

Java documentation for android.preference.PreferenceManager.getPreferenceDataStore().

Property setter documentation:

Sets a PreferenceDataStore to be used by all Preferences associated with this manager that don't have a custom PreferenceDataStore assigned via Preference#setPreferenceDataStore(PreferenceDataStore). Also if the data store is set, the child preferences won't use android.content.SharedPreferences as long as they are assigned to this manager.

Java documentation for android.preference.PreferenceManager.setPreferenceDataStore(android.preference.PreferenceDataStore).

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