开发者

How to save app state(custom object, Vector, Object) on runtime?

I am a new developer for Android and searching about how to save custom object as persistent data. How can I save an object and restore it ?

I've researched several methods such as o开发者_StackOverflow中文版nSaveInstanceState and onRestoreInstanceState. But there is no method to save Vector/Object/. And I couldn't know how to save when it is on runtime.

Can you suggest me sample code ?

Thanks in advance.


You can do it.

Check up the Data storage section of Dev Guide doc. There provides several ways of saving data persistently. It`s easy to learn.

By the way, onSaveInstanceState and onRestoreInstanceState is not way of saving persistent data, the data is operated merely in mem.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜