0

How should List<MyClass> be properly passed from the main activity to a secondary activity?

From what I understand, there are two ways to bundle data: Parceling and Serializing. What are the pros and cons to each?

Thanks

linsek
  • 3,334
  • 9
  • 42
  • 55

3 Answers3

2

Parcelable is significantly faster than Serializable -- last I checked, at least an order of magnitude. On the other hand, it does require more work from you, since it doesn't do things automatically. But that is one of the reasons it is so much faster. :)

Generically I strongly recommend staying away from Serializable.

hackbod
  • 90,665
  • 16
  • 140
  • 154
1

This link on anddev might give you answer in details http://www.anddev.org/bundle_vs_parcel_vs_message-t517.html

Also there is one more article on the same topic. Its here http://www.mooproductions.org/node/6?page=57

Umakant Patil
  • 2,227
  • 6
  • 32
  • 58
0

Check the android developer site, Parcel , Parcelable and Serializable

Labeeb Panampullan
  • 34,521
  • 28
  • 94
  • 112