转自 https://blog.csdn.net/xiaodongvtion/article/details/8966234
/** 两个Activity之间进行List Object传输 */
Intent myIntent = new Intent();
ArrayList<Person> personList = new ArrayList<Person>();
Parcel parcel = Parcel.obtain();
Person person = Person.CREATOR.createFromParcel(parcel);
person.setId(10);
person.setName("bingbing");
personList.add(person);
parcel.recycle();
myIntent.putParcelableArrayListExtra("list", personList);
myIntent.setClass(this, SecondActivity.class);
startActivity(myIntent);
ArrayList<Person> list = getIntent().getParcelableArrayListExtra(
"list"
);
int
fistOneId = list.get(
0
).getId();
Log.i(TAG,
"id : "
+ fistOneId);