On Tue, Nov 30, 2010 at 1:11 AM, Doug <beafd...@gmail.com> wrote:
>
> Parcelable is not such a headache once you get the boilerplate code out of
> the way.
>

It's not only the repetitive "CREATOR" stuff. I found that if I send a
custom parcelable to a Service which was to start after my main Activity had
gone away, loading my object would fail (class loader not available or
something ... there was a thread or two about it a while ago). This was my
major motivation for ditching parcelable.

Parcelable is an advantage if you need to pass arrays of such objects
> around. You can't attach arrays of Bundles to intents without your own
> mechanisms.
>

Sure you can. Bundle extends parcelable, so you can attach an array of
parcelables that are Bundles.
Or, better yet, you can pass an ArrayList of Bundles with
putParcelableArrayListExtra(), which takes advantage of the generics
interface.

-------------------------------------------------------------------------------------------------
TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to