Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make classes like String parcelable?

Is there any way to make a final/closed class parcelable? E.g. String or ZonedDateTime(from java.time).

like image 353
stefan.at.wpf Avatar asked Apr 11 '26 21:04

stefan.at.wpf


1 Answers

Is there any way to make a final/closed class parcelable?

No, sorry.

E.g. String or ZonedDateTime(from java.time).

Android can already put a String into a Parcel, so there is no need somehow make it Parcelable.

Also, bear in mind that custom Parcelable classes cannot be used in all cases. I just had to deal with that particular problem this morning.

like image 55
CommonsWare Avatar answered Apr 13 '26 12:04

CommonsWare