October 2019
Intermediate to advanced
434 pages
11h 54m
English
Parcelable is a common interface within Android development aimed at providing a more performant serialization API. Generating implementations of the Parcelable interface can be a tedious and boilerplate-filled task involving the creation of a lot of simple and repetitive code. Thankfully, the Kotlin Android Extensions provide an annotation that can generate a Parcelable implementation for us. To make use of this functionality, we can add the @Parcelize annotation to any class that implements Parcelable:
@Parcelizedata class Person(val firstName: String, val lastName: String): Parcelable
By adding the @Parcelize annotation to our model objects, the plugin will generate the required Parcelable implementations ...
Read now
Unlock full access