Code example for Parcel

Methods: readBundle

0
		percentage = bndl.getFloat("percentage");
	} 
 
	public static final Parcelable.Creator<DominantColor> CREATOR = new Parcelable.Creator<DominantColor>() {
		public DominantColor createFromParcel(Parcel in) { 
			return new DominantColor(in.readBundle()); 
		} 
		public DominantColor[] newArray(int size) { 
			return new DominantColor[size]; 
		} 
	}; 
 
	@Override 
	public int describeContents() { 
		return 0; 
	} 
 
	@Override 
	public void writeToParcel(Parcel dest, int flags) {
		Bundle bndl = new Bundle();
		bndl.putInt("color", color);