I have a ArrayList that I am passing between activities. In this ArrayList are objects made from a class that has four va
You should set the ClassLoader. Try this:
public Question (Parcel parcel) {
this.id = parcel.readString();
this.text = parcel.readString();
this.image = parcel.readString();
this.choices = parcel.readTypedList(Choices.class.getClassLoader());
}
Also you can try to read and write a typed List instead of an ArrayList:
public Question (Parcel parcel) {
this.id = parcel.readString();
this.text = parcel.readString();
this.image = parcel.readString();
this.choices = new ArrayList<Choices>();
parcel.readArrayList(this.choices, Choices.Creator);
}
You should try replacing this.choices = parcel.readArrayList(null); by this.choices = parcel.readArrayList(Choices.class.getClassLoader());
Hope this helps