Package com.sl.pocketbook.bean;import android.os.parcel;import android.os.parcelable;import android.os.Parcelable.Creator;/** * Brands * * @author sxn * */public class ProductBrandBean implements Parcelable { /** * id */ private int id; /** * Quantity */ private int conunt; /** * icon */ private String urlicon; /** * name */ private String brandName; public static Final parcelable.creator<producTbrandbean> creator = new creator<productbrandbean> () { @Override public Productbrandbean createfromparcel (Parcel source) { // TODO Auto-generated method stub // must read the data in the order in which the member variable is declared, or there will be an error getting data productbrandbean p = new productbrandbean ( ); p.setid (Source.readInt ()); p.setconunt (Source.readInt ()); p.seturlicon (Source.readstring ()); p.setbrandname (Source.readstring ()); return p; } @Override public productbrandbean[ ] newarray (int size) { / / todo auto-generated method stub return new ProductBrandBean[size]; } }; public string getbrandname () { return brandName; } Public void setbrandname (String brandname) { this.brandname =&Nbsp;brandname; } public productbrandbean () { } public int getid () { return id; } public void setid ( Int id) { this.id = id; } public int getconunt () { return conunt; } public void Setconunt (Int conunt) { this.conunt = Conunt; } public string geturlicon () { return urlIcon; } public void seturlicon (StrinG urlicon) { this.urlIcon = urlIcon; } @Override public int Describecontents () { // todo auto-generated method stub return 0; } @Override public void writetoparcel (Parcel dest, int flags) { // 1. The data must be encapsulated in the order in which the member variable is declared. Otherwise there will be an error getting data // 2. Serializing Objects dest.writeint (ID); dest.writeint (Conunt); dest.writestring (Urlicon); dest.writestring (brandname); }}