共用方式為


PreferenceManager.GetDefaultSharedPreferences(Context) 方法

定義

SharedPreferences取得實例,指向指定內容中喜好設定架構所使用的預設檔案。

[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

參數

context
Context

想要其值的喜好設定內容。

傳回

SharedPreferences實例,可用來擷取和接聽喜好設定的值。

屬性

備註

SharedPreferences取得實例,指向指定內容中喜好設定架構所使用的預設檔案。

android.preference.PreferenceManager.getDefaultSharedPreferences(android.content.Context)Java 檔。

此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。

適用於