Aracılığıyla paylaş


PreferenceManager.SharedPreferencesName Property

Definition

Returns the current name of the SharedPreferences file that preferences managed by this will use. -or- Sets the name of the SharedPreferences file that preferences managed by this will use.

public virtual string? SharedPreferencesName { [Android.Runtime.Register("getSharedPreferencesName", "()Ljava/lang/String;", "GetGetSharedPreferencesNameHandler")] get; [Android.Runtime.Register("setSharedPreferencesName", "(Ljava/lang/String;)V", "GetSetSharedPreferencesName_Ljava_lang_String_Handler")] set; }
[<get: Android.Runtime.Register("getSharedPreferencesName", "()Ljava/lang/String;", "GetGetSharedPreferencesNameHandler")>]
[<set: Android.Runtime.Register("setSharedPreferencesName", "(Ljava/lang/String;)V", "GetSetSharedPreferencesName_Ljava_lang_String_Handler")>]
member this.SharedPreferencesName : string with get, set

Property Value

The name that can be passed to Context#getSharedPreferences(String, int).

Attributes

Remarks

Property getter documentation:

Returns the current name of the SharedPreferences file that preferences managed by this will use.

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

Property setter documentation:

Sets the name of the SharedPreferences file that preferences managed by this will use.

If custom PreferenceDataStore is set, this won't override its usage.

Java documentation for android.preference.PreferenceManager.setSharedPreferencesName(java.lang.String).

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

  • <xref:Android.Content.Context.GetSharedPreferences(System.String%2c+Android.Content.FileCreationMode)>