开发者

Android - When bundling List<MyClass> use Parceling or Serializing?

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 an开发者_开发知识库d cons to each?

Thanks


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.


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


Check the android developer site, Parcel , Parcelable and Serializable

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜