如何实现在Android的持久存储 [英] how to implement Persistent storage in android
本文介绍了如何实现在Android的持久存储的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
可能重复:结果
<一href=\"http://stackoverflow.com/questions/10772147/persistent-data-storage-in-android-development\">Persistent数据存储在Android的发展
我要实现我的应用程序存储用户名,当用户选择记住我复选框持久性存储。任何人都可以指导我这个?
I want to implement persistent storage in my application to store the UserName, when the user selects "Remember me" Checkbox. Can anybody guide me for this?
推荐答案
您必须使用共享preferences用于这一目的。共享preferences存储信息,直到应用程序被卸载。 本博客文章给出了示例
You have to use shared preferences for this purpose. Shared preferences store information until the app gets uninstalled. This blog post gives an example.
这篇关于如何实现在Android的持久存储的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文