首页 > 其他 > 详细

SharedPreferences简单使用

时间:2015-03-11 21:16:06      阅读:189      评论:0      收藏:0      [点我收藏+]

1.存

SharedPreferences sp = context.getSharedPreferences("mybound", Context.MODE_PRIVATE);
Editor editor = sp.edit();
editor.putString("serial_no", serial_no);
editor.commit();

2.取

SharedPreferences sp = = context.getSharedPreferences("mybound", Context.MODE_PRIVATE);

sp.getString("serial_no", "");

 

SharedPreferences简单使用

原文:http://www.cnblogs.com/ponos/p/4330944.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!