存储和检索共用preference一个类对象对象、preference

由网友(男生干净 男生取什么样的最适合)分享简介:在Android的我需要知道,如果我们可以存储一类的共享preference的对象,并检索对象latter.If,可以怎么做吧。如果它是不可能有什么其他的可能性这样做吧。我知道序列化是一种选择,但我在寻找机会使用共享preference。In android i need to know if we can stor...

在Android的我需要知道,如果我们可以存储一类的共享preference的对象,并检索对象latter.If,可以怎么做吧。如果它是不可能有什么其他的可能性这样做吧。我知道序列化是一种选择,但我在寻找机会使用共享preference。

In android i need to know if we can store an object of a class in shared preference and retrieve the object latter.If it is possible how to do it.If it is not possible what are the other possibilities of doing it.I know serialization is one option but i am looking for possibilities using shared preference.

任何帮助是AP preciated。

Any help is appreciated.

感谢。

推荐答案

不可能的。

您只能存储在共享prefences简单值Share$p$pferences.Editor

You can only store, simple values in SharedPrefences SharePreferences.Editor

什么特别关于类你需要保存?

What particularly about the class do you need to save?

阅读全文

相关推荐

最新文章