1 获取SharedPreferences对象
pre = PreferenceManager.getDefaultSharedPreferences(this);
2 获取editor对象
editor =pre.edit();
3 保存数据
editor.putBoolean("isRemeber",true);
editor.putString("password",password);
editor.putString("account",account);
4 读取数据
String account = pre.getString("account", "");
String password = pre.getString("password", "");