0

I have a ArrayList<ArrayList<String>>, how to do put it into a parcel? I would prefer not using serializing (but it will still be accepted if there is no other easier/better method).

ArrayList<ArrayList<String>> hello = null;

dest.writeList(hello);

in.readList(hello,null);
Carson Ip
  • 1,896
  • 17
  • 27
  • 1
    I assume by "put in a parcel" you mean save it since you mentioned Serializing. if that's the case, and you really don't want to serialize (for some reason), then just write your own implementation to store/read the object to some file. – Kon Apr 09 '14 at 04:14
  • re @Kon: I just want to pass it between fragments/activities in android. – Carson Ip Apr 09 '14 at 04:19
  • "parcel" is this something related to android. is android similar to java. just curious but if its similar to java then its impl wud be similar :) – vikeng21 Apr 09 '14 at 04:20
  • Please follow this link http://stackoverflow.com/questions/7042272/how-to-properly-implement-parcelable-with-an-arraylistparcelable – Lavekush Agrawal Apr 09 '14 at 04:22

0 Answers0