Code example for Parcel

Methods: writeFloatwriteInt

0
 
        @Override 
        public void writeToParcel(Parcel out, int flags)
        { 
        	super.writeToParcel(out, flags);
        	out.writeInt(compassMode ? 1 : 0);
        	out.writeFloat(this.azimuth);
        	out.writeFloat(this.course);
        	out.writeFloat(this.bearing);
        	out.writeFloat(this.xtk);
        	out.writeInt(this.proximity);
        	out.writeInt(this.navigating);
        	out.writeFloat(this.rtA);
        	out.writeFloat(this.rtAS);
        	out.writeFloat(this.rtB);
        	out.writeFloat(this.rtBS);
        	out.writeFloat(this.rtC);
        	out.writeFloat(this.rtCS);
        } 
 
        public static final Parcelable.Creator<SavedState> CREATOR = new Parcelable.Creator<SavedState>()
        { 
        	public SavedState createFromParcel(Parcel in) 
1
CodeRank