-2

I have a object A that contain an List of Object B's. Now i wish to place the object A into a Bundle by using a Parceable bundle. How can i do this ?

Class A{
 ArrayList<B> secondClass
}
class B{
}

Kind Regards

user1730789
  • 5,077
  • 7
  • 33
  • 54

1 Answers1

0

Parceable Interface for classes whose instances can be written to and restored from a Parcel. Classes implementing the Parcelable interface must also have a static field called CREATOR, which is an object implementing the Parcelable.Creator interface.

So You need to implements Parcelable in Class A

For details See this link

Arun C
  • 8,985
  • 1
  • 27
  • 42