Kotlin Parcelize Power Features
You are going to delete lots of lines of code! Yes, it is not a clickbait!
How do you pass your model between activities?
- Serializable?
- EventBus / Otto ?
- Parcelable?
Serializable = Reflection! Run Forest Run!!! It is terrible for Android performance. Bus libraries like EventBus or Otto are easy to use and have good performance but after some time they cause too much complexity in your code.
Parcelable interface is great for Android performance but it has too much boilerplate.
Parcelize 😍
Kotlin added parcelable support in version 1.1.4.Android Extensions plugin now includes an automatic Parcelable implementation generator. Declare the serialized properties in a primary constructor and add a @Parcelize annotation, and writeToParcel()/createFromParcel() methods will be created automatically.
Leave Kotlin Parcelize Power Features to:
Read more #kotlin posts
Best Posts From Sawan Kumar
We have not curated any of tellmehowblog's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.
More Posts From Sawan Kumar
- Do you know about Android Dynamic Delivery Module?
- How to Add Android Navigation Drawer with Wave Animation?
- Top 5 Android Tab Layout Animation
- Facebook and Whatsapp collide in data leak case
- Download PDF Free- The Weapon Wizards: How Israel Became a High-Tech Military Superpower
- Advantage and Disadvantage of Blockchain technology
- WhatsApp launches new update, find out what it is
- Top 10 Indian banking apps found to be at risk
- PHRASE OF THE DAY - It's/That's not on
- Kodak ties up with blockchain firm to mint its own cryptocurrency