Android 开发心得分享
2010-03-18 16:13:00 来源:WEB开发网核心提示:return 0;}public void writeToParcel(Parcel out, int arg1){// TODO Auto-generated method stubout.writeBundle(this.mBundle);}public static final Parcelable.Creato
return 0;
}
public void writeToParcel(Parcel out, int arg1)
{
// TODO Auto-generated method stub
out.writeBundle(this.mBundle);
}
public static final Parcelable.Creator CREATOR = new Parcelable.Creator() {
public TrainInfo createFromParcel(Parcel in)
{
SampleBean ti=new SampleBean();
ti.mBundle=in.readBundle();
return ti;
}
public SampleBean[] newArray(int size)
{
return new SampleBean[size];
}
};
}
这里采用Bundle是因为在Parcel中并没有key的概念存在,而Bundle相当于Map。
更多精彩
赞助商链接