用SharedPreferences存储EditText中数据,代码没问题,通过DDMS透视图,data\data\<packagename>
找不到存储数据的文件,模拟器调试时出现报错“***应用程序进程终止,请重试”。
找不到存储数据的文件,模拟器调试时出现报错“***应用程序进程终止,请重试”。
解决方案 »
- 关于Google Maps Android API v2 使用GoogleMap.addMarker ()进行定位
- 摩讯的社区SDK开放了用户登录的接口吗?
- 关于Notification的问题
- ExpandableListView的长按事件
- android关于权限的问题
- Android开发视频监控软件问题!
- android webserver 调用 帮我看看是哪里出啦错误为什么source not found
- 求android4.2.2的源码下载地址
- android开发环境搞了好几天了还不行,怎么办?
- apk 反编译后xml 里报错 为什么 很多重复name
- Android应用程序 单例对象会不会被回收?
- PopupWindow 如何响应背景view中button按键事件?
http://blog.csdn.net/coolszy/archive/2011/05/21/6435970.aspx
SharedPreferences sp;onCreate(.....)中读取
sp=getSharedPreferences("wenjianming", MODE_PRIVATE);
boolean init=sp.getBoolean("init", false);onDestory(..)中保存
Editor editor=sp.edit();
editor.putBoolean("init",init);
editor.commit();
那还不如放到onSaveInstance(Bundle bundle)中!!