Hi i have data class. `d*ata class Customer(val ...
# android
v
Hi i have data class.
d*ata class Customer(val item: int,val name : String)
.* i want to pass through bundle.
val bundle = Bundle()
but i didn't get which one i used putParcelable or something else.
bundle.*putParcelable("customer, Customer(1,"X")")*
. It giving error Customer is not parcelable
a
Please, you are spamming the channel. Craft your question in a single post and after that use Threads
v
ohh sorry i am new i'll remember that
d
anyway, you need to make it parcelable (extend) without it, bundle withh give error
v
thanks
p
anyway, you need to make it parcelable (extend) without it, bundle withh give error
It's an interface. You extend classes and implement interfaces.
g
You also can extend interface by another interface
But honestly it’s very minor semantical change, looks more like java-biased purism based on the language keyword 🤷 After all you also implement abstract classes, even though, they are classes, and you may do not implement anything in interface, it can be a marker interface or interface with default method
p
Just saying ^^
d
yeah forgot about it, i just want to convey idea of how to make it parcelable. so didnt check about interface or class
z
as far as I know kotlin-parcelize plugin was deprecated as the version of kotlin 1.4
🚫 1
d
i think android-parcelize was deprecated and it was replaced by kotlin-parcelize
☝️ 1
z
hmm it could be
d
it was used from plugin
kotlin-android-extensions
which was deprecated and if you want to use parcelable now we need to use
kotlin-parcelable
, without it android studio will use extensions by default.