- 博客(3)
- 资源 (2)
- 收藏
- 关注
转载 SharedPreference.Editor的apply和commit方法异同
在Android 中存储数据时经常用SharedPreference, 并且在提交数据时一直用的是Editor的commit方法, 今天无意了看到了系统用了apply,看了方法的介绍, 原来这个方法也是可以提交数据的.apply方法在官方SDK说明如下:Commit your preferences changes back from this Editor to the Sh
2016-09-25 13:44:46 272
原创 android之文件存储
1、保存文件public FileService(Context context){ //初始化context this.context = context; } /*文件存储 * */ public void save(String filename, String filecontent) throws Except...
2016-09-17 16:12:16 351
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人