Android: How to save/restore data

↘锁芯ラ 提交于 2019-12-02 11:02:42

问题


In my app I have a Linked List (I use the standard List()). I want this list to be saved to the sd card (or the phone memory) every time the user exits the app and restore it every time the user starts the app. How can I do it ?


回答1:


you can use SharedPreferences , refer the doc , and this tutorial to understand how to do it :)




回答2:


The Android Developer site has an excellent guide how you can store your data on the phone.



来源:https://stackoverflow.com/questions/7665339/android-how-to-save-restore-data

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!