//保存数据
SharedPreferences sp= context.getSharedPreferences("name", Context.MODE_PRIVATE);
Editor editor = sp.edit();
editor.putBoolean("boolean",
boolean);
editor.commit();
//读取数据
SharedPreferences sp =
context.getSharedPreferences("name", Context.MODE_PRIVATE);
boolean b = sp.getBoolean("
boolean", true);