SharedPreferences user = getSharedPreferences("User", MODE_PRIVATE);
int anInt = user.getInt("selectcolor", 0);
if (anInt != 0) {
rlBackground.setBackgroundColor(anInt);
}
//接收值
SharedPreferences user = getSharedPreferences("User", MODE_PRIVATE);
SharedPreferences.Editor edit = user.edit();
edit.putInt("selectcolor", "保存的数据");
edit.commit();
//保存值