Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何保存未实现可序列化的类的对象?
例如:查看类对象
您可以扩展您的类并让您的类实现可序列化:
public class MyClassSerializable extends AClass implements Serializable { //... }
注意:谢谢@MoshErsan,这对View课程不起作用,因为Drawable不是Serializable。您将不得不序列化您的视图参数,然后使用这些参数重新创建您的视图。
View
Drawable
Serializable