Code example for Parcel

Methods: writeInt, writeString, writeValue

0
        } 
 
        @Override 
        public void writeToParcel(Parcel dest, int flags) {
            super.writeToParcel(dest, flags);
            dest.writeString(mSerializedPattern);
            dest.writeInt(mDisplayMode);
            dest.writeValue(mInputEnabled);
            dest.writeValue(mInStealthMode);
            dest.writeValue(mTactileFeedbackEnabled);
        } 
 
        public static final Parcelable.Creator<SavedState> CREATOR =
                new Creator<SavedState>() { 
                    public SavedState createFromParcel(Parcel in) { 
                        return new SavedState(in); 
                    } 
 
                    public SavedState[] newArray(int size) { 
                        return new SavedState[size]; 
                    }