摘要:
转自:http://blog.sina.com.cn/s/blog_78e3ae430100pxba.htmlandroid提供了一种新的类型:Parcel。本类被用作封装数据的容器,封装后的数据可以通过Intent或IPC传递。 除了基本类型以外,只有实现了Parcelable接口的类才能被放入Parcel中。Parcelable实现要点:需要实现三个东西1)writeToParcel 方法。该方法将类的数据写入外部提供的Parcel中.声明如下:writeToParcel (Parcel dest, int flags) 具体参数含义见javadoc2)describeContents方法 阅读全文
posted @ 2011-11-16 11:15
阿彬
阅读(42971)
评论(1)
推荐(3)

浙公网安备 33010602011771号