I have a ListActivity where the ListView is driven by a custom array adapter which has custom objects in it. The custom object is a Site.
On orientation change, my current implementation is trying to hit the database again to populate the ListView and I want to save the current ArrayAdapter then re-attach it to the ListView after the orientation change.
Whilst I wasn't keen on it, I resigned myself to the fact that I would need Site to implement Parcelable so I could then save the entire ArrayAdpter to the bundle as an array of Paracables.
I have looked at this post which does pretty much what I need to do.
However, my Site object has variables within it which are also custom objects and those objects themselves also have other objects such as DateFormat in them. I can't figure out from the post that I linked to above how to implement this so that the objects within the objects that make up part of the Site object can be included in the Parcel, since this example only deals with strings and the parcel doesn't seem to have a writeObject() method!
Are there any alternatives? (I'd love to avoid using Parcelable at all, but if I have to that's ok)
thanks Aaron