Serializable or Parcelable


#1

In EU4YouToolbar, would it b ok if we make Country implement Serializable instead of using a custom implementation of Parcelable?
Are there any specific benefits of Parcelable over Serializable?


#2

In EU4YouToolbar, would it b ok if we make Country implement Serializable instead of using a custom implementation of Parcelable?

If you mean “will it compile and run?”, then yes, Serializable is fine.

Are there any specific benefits of Parcelable over Serializable?

Parcelable is faster at runtime, though usually that is not a huge issue nowadays, since we rarely deal with large numbers of these. It was a bigger issue in earlier versions of Android (when reflection was slow) and on older Android devices (where devices were slow).


#3

Ok thanks for the detailed answer.