Code example for Parcel

Methods: writeInt, writeList, writeString

0
    } 
 
    @Override 
    public void writeToParcel(Parcel dest, int flags) {
 
        dest.writeInt(mResourceId);
        dest.writeInt(mUnlockResourceId);
        dest.writeString(mId);
        dest.writeString(mDescription);
        dest.writeString(mSet);
        dest.writeList(mObjectives);
        dest.writeList(mDependencies);
        dest.writeList(mUnlocks);
 
    } 
 
    public static final Parcelable.Creator<AssignmentData> CREATOR = new Parcelable.Creator<AssignmentData>() {
 
        public AssignmentData createFromParcel(Parcel in) { 
            return new AssignmentData(in); 
        }