Udostępnij za pośrednictwem


PreferenceManager.GetDefaultSharedPreferences(Context) Method

Definition

Gets a SharedPreferences instance that points to the default file that is used by the preference framework in the given context.

[Android.Runtime.Register("getDefaultSharedPreferences", "(Landroid/content/Context;)Landroid/content/SharedPreferences;", "")]
public static Android.Content.ISharedPreferences? GetDefaultSharedPreferences (Android.Content.Context? context);
[<Android.Runtime.Register("getDefaultSharedPreferences", "(Landroid/content/Context;)Landroid/content/SharedPreferences;", "")>]
static member GetDefaultSharedPreferences : Android.Content.Context -> Android.Content.ISharedPreferences

Parameters

context
Context

The context of the preferences whose values are wanted.

Returns

A SharedPreferences instance that can be used to retrieve and listen to values of the preferences.

Attributes

Remarks

Gets a SharedPreferences instance that points to the default file that is used by the preference framework in the given context.

Java documentation for android.preference.PreferenceManager.getDefaultSharedPreferences(android.content.Context).

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