Parcelable Class
I have a class below and would like to implement Parcelable. I hit the error in. Please advice. in.readValue(row); Error Message: The method readValue(ClassLoader) in the type Pa
Solution 1:
The error is because readValue
is expecting an object of type ClassLoader
and you are passing it an ArrayList
. But your bigger problem is that you can't just parcel and unparcel a list of objects of any type. Look at the documentation for writeValue:
http://developer.android.com/reference/android/os/Parcel.html#writeValue(java.lang.Object)
Your class cls_datarow
needs to be supported by this method somehow. I would just have cls_datarow
implement Paracable
and use writeTypedList
to write it and createTypedArrayList
to read it.
Post a Comment for "Parcelable Class"