Android SharedPreferences的应用

//定义
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();//设置

 

posted @ 2014-03-06 00:32  海乐学习  阅读(245)  评论(0编辑  收藏  举报