Android的:如何保存/恢复数据 [英] Android: How to save/restore data

查看:90
本文介绍了Android的:如何保存/恢复数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的应用程序我有一个链表(我用的是标准的列表())。 我想这个列表保存到SD卡(或手机内存)每个用户退出应用程序,并在每次用户启动应用程序时恢复时间。 我该怎么办呢?

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 ?

推荐答案

您可以使用共享preferences ,指的的 DOC ,这的教程,以了解如何做到这一点:)

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

这篇关于Android的:如何保存/恢复数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆