有什么方法可以使最终/封闭类可打包?例如。 String
或 ZonedDateTime
(来自 java.time
)。
最佳答案
Is there any way to make a final/closed class parcelable?
不,对不起。
E.g. String or ZonedDateTime(from java.time).
Android 已经可以将 String
放入 Parcel
中,因此没有必要以某种方式使其成为 Parcelable
。
此外,请记住自定义 Parcelable
类 cannot be used in all cases .今天早上我不得不处理这个特殊问题。
关于android - 使 String 之类的类可打包?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61462263/