eg. 传递 ArrayList groups
一:将对象定义成 Parcelable 类型public class Group implements Parcelable{
}
in:
Bundle b = new Bundle();
b.putParcelableArrayList("list",groups);
out:
ArrayList groups = b.getParcelableArrayList("list");
二,将对象定义成 Serializable 类型
public class Group implements Serializable{
}
in:
Bundle b = new Bundle();
b.putSerializable("list", groups);
out:
ArrayList groups = (ArrayList) b.getSerializable("list");
原文:http://blog.csdn.net/geeklei/article/details/43544341