Is there any `@Parcelize` equivalent for saving cu...
# android
g
Is there any
@Parcelize
equivalent for saving custom view state?
c
@Parcelize
is placed on
Parcelable
classes, which can directly be returned from
onSaveInstanceState()
, or placed in a Bundle. Normally this is done in an Activity, though I think it can be done with Views as well (though it looks like there’s a bit of additional boilerplate to make it work https://developer.android.com/reference/android/view/View.BaseSavedState)
g
Thanks, I meant to ask if there’s something like Parcelize to reduce the boilerplate of subclassing BaseSavedState/AbsSavedState
Just realized I can simply use @Parcelize and not extend AbsSavedState at all though, as long as I save the super’s state myself