存储登录信息
ISharedPreferences
prefs =
PreferenceManager
.
GetDefaultSharedPreferences
(mContext);
ISharedPreferencesEditor
editor = prefs.
Edit
();
editor.
PutBoolean
(
"key_for_my_bool_value"
, mBool);
// editor.Commit();
editor.
Apply
();
读取保存的登录信息
ISharedPreferences
prefs =
PreferenceManager
.
GetDefaultSharedPreferences
(mContext);
mBool = prefs.
GetBoolean
(
"key_for_my_bool_value"
, <
default
value>);
mInt = prefs.
GetInt
(
"key_for_my_int_value"
, <
default
value>);