Code example for Parcel

Methods: writeList, writeString

0
    	caption = in.readString();
		in.readList(verses = new ArrayList<Verse>(), getClass().getClassLoader());
	} 
 
	@Override public void writeToParcel(Parcel out, int flags) {
		out.writeString(caption);
    	out.writeList(verses);
    } 
 
    @Override public int describeContents() { 
    	return 0; 
    } 
     
    public static final Parcelable.Creator<Lyric> CREATOR = new Parcelable.Creator<Lyric>() {
        @Override public Lyric createFromParcel(Parcel in) { 
            return new Lyric(in); 
        } 
 
        @Override public Lyric[] newArray(int size) { 
            return new Lyric[size]; 
        }