标签:
public class TradeEntity implements Parcelable{ public String id; //有关进度条的参数 ArrayList<TradeStateNodeInfo> nodes; public TradeEntity() { nodes = new ArrayList<TradeStateNodeInfo>(); } /////////////////////////实现parcel接口/////////////////////////////// @Override public int describeContents() { return 0; } @Override public void writeToParcel(Parcel out, int arg1) { out.writeString(id); out.writeList(nodes); } private TradeEntity(Parcel in) { id = in.readString(); nodes = in.readArrayList(TradeStateNodeInfo.class.getClassLoader()); } public static final Parcelable.Creator<TradeEntity> CREATOR = new Parcelable.Creator<TradeEntity>() { public TradeEntity createFromParcel(Parcel in) { return new TradeEntity(in); } public TradeEntity[] newArray(int size) { return new TradeEntity[size]; } }; }
android 开发Parcelable 怎么传值ArrayList
标签:
原文地址:http://www.cnblogs.com/feijian/p/4776394.html