0

Sample sealed class:

sealed class Sample(val string: String, ...) : Parcelable {
    @Parcelize object Sample1 : Sample("Text1", ...)
    @Parcelize object Sample2 : Sample("Text2", ...)
    ...
}

In Enum constants in Java, according to docs

The serialized form of an enum constant consists solely of its name; field values of the constant are not present in the form.

I would like to know if this is also the case for sealed classes that are parcelized. I am trying to determine if this would be an issue when stored in SavedInstanceState bundle, which has a size limit (more info).

danartillaga
  • 696
  • 5
  • 14

0 Answers0