存储数据
 SharedPreferences.Editor edit = getSharedPreferences("data", MODE_PRIVATE).edit();
edit.putString("bookname", "完美");
edit.putString("anthor", "刘红");
edit.putInt("page", 700);
edit.putInt("price", 230);
edit.apply();
读取数据
 SharedPreferences prep = getSharedPreferences("data", MODE_PRIVATE);
String bookname= prep.getString("bookname", "");
String anthor= prep.getString("anthor", "");
int page= prep.getInt("page",0);
int price=prep.getInt("price",0);

 
												

最新文章

  1. 【记录】ASP.NET IIS ISAPI_Rewrite
  2. windows下vim编辑器,字符编码设置。
  3. flume 使用 spool source的时候字符集出错
  4. 12.C#yield return和yield break及实际应用小例(六章6.2-6.4)
  5. C++重要知识点小结---2
  6. Core身份认证
  7. Objective-C Autorelease Pool 的实现原理
  8. SuperSocket使用demo
  9. Java之GUI编程(一)
  10. 《JavaScript高级程序设计》读书笔记 ---操作符一
  11. Myeclipse黑色主题配置
  12. 剖析非同质化代币ERC721-全面解析ERC721标准
  13. python 玩耍天地
  14. QT使用MSVC编译器输出中文乱码问题解决方法
  15. vue教程自学笔记(二)
  16. Python开发——函数【基础】
  17. 《剑指offer》-中序遍历下一个节点
  18. 字典树Trie树
  19. ACM题目————Face The Right Way
  20. phpdocumentor生成代码注释文档(linux)

热门文章

  1. Fix "Unable to lock the administration directory (/var/lib/dpkg/)" in Ubuntu
  2. Apsara Clouder专项技能认证:实现调用API接口 (笔记)
  3. hadoop第一个例子WordCount
  4. Node.js 101(2): Promise and async
  5. 替换Android自带apk【转】
  6. 强大的DataGrid组件[7]_自定义DataGrid——Silverlight学习笔记[15]
  7. iOS 7 present/dismiss转场动画
  8. python的thread和threading区别
  9. Spring事物注意事项
  10. Gym 100548F Color (数论容斥原理+组合数)