Code example for Parcel

Methods: readIntreadParcelablereadString

0
        this.text = text;
        this.icon = null;
    } 
 
    public Item(Parcel in) {
        id = in.readInt();
        text = in.readString();
        icon = in.readParcelable(null);
    } 
 
    public int describeContents() { 
        return 0; 
    } 
 
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(id);
        dest.writeString(text);
        dest.writeParcelable(icon, flags);
    } 
 
Stop searching for code, let great code find you!  Add Codota to your java IDE