通过实现Parcelable接口序列化对象的步骤:
1、实现Parcelable接口。
2、并且实现Parcelable接口的public
void writeToParcel(Parcel dest, int flags)方法 。
3、自定义类型中必须含有一个名称为CREATOR的静态成员,该成员对象要求实现Parcelable.Creator接口及其方法。
传递实体类:
Bundle bundle = new Bundle();
//bundle.putSerializable(TITLE, title);
bundle.putParcelable(TITLE, title);
context.startActivity(new Intent(context, target).putExtras(bundle));
接收:
mCollectParamObj = (CollectParamObj) getIntent().getParcelableExtra(
"title");
原文:http://www.cnblogs.com/zhaoleigege/p/4997090.html