//定义 SharedPreferences share = getSharedPreferences("perference",MODE_PRIVATE); //取值 String strBuyMall_value=share.getString("buymall_value",""); //赋值 Editor editor = share.edit(); editor.putString("buymall_value", strBuyMall_init); editor.commit();//设置
Android SharedPreferences的应用,布布扣,bubuko.com
原文:http://www.cnblogs.com/hailexuexi/p/3583678.html