[android-developers] Re: extending parcelables

2009-07-17 Thread Bart van Wissen
On Jul 16, 6:52 pm, Dianne Hackborn hack...@android.com wrote: Just use ArrayListParcelable as your data type. Putting ListParcelable in my aidl file resulted in the following errors: The method writeBinderList(ListIBinder) in the type Parcel is not applicable for the arguments

[android-developers] Re: extending parcelables

2009-07-16 Thread Bart van Wissen
2. Use a generic Parcelable class type, in which case the marshalling code will inspect the class type, included that in the marshalled data, and use that to re-construct it on the other side. I don't understand this. My program deals with Condition objects, which can be put in a list to

[android-developers] Re: extending parcelables

2009-07-16 Thread Dianne Hackborn
Just use ArrayListParcelable as your data type. On Thu, Jul 16, 2009 at 5:31 AM, Bart van Wissen bartvanwis...@gmail.comwrote: 2. Use a generic Parcelable class type, in which case the marshalling code will inspect the class type, included that in the marshalled data, and use that to

[android-developers] Re: extending parcelables

2009-07-15 Thread Streets Of Boston
It looks like your Animal class is abstract and should never be constructed. Declare Animal 'abstract' and see if you get an instantiation error. Have your tried to put the 'public static final Parcelable.Creator CREATORCat' and 'public static final Parcelable.Creator CREATORDog' variables and

[android-developers] Re: extending parcelables

2009-07-15 Thread Bart van Wissen
On Jul 15, 5:21 pm, Streets Of Boston flyingdutc...@gmail.com wrote: It looks like your Animal class is abstract and should never be constructed. Declare Animal 'abstract' and see if you get an instantiation error. It should be abstract, but I cannot make it abstract because then I cannot add

[android-developers] Re: extending parcelables

2009-07-15 Thread Dianne Hackborn
We deliberately don't support this kind of thing to keep the IPC protocol simple. You have basically two choices: 1. Use a concrete class type, which will result in ONLY that classes CREATOR being used to unmarshall its data. The protocol does no type inspection here, since that would introduce