Code example for Parcel

Methods: readBundle, readInt

0
	private static class SavedState extends BaseSavedState {
		Bundle dialogBundle;
		boolean isDialogShowing;
 
		public SavedState(Parcel source) {
			super(source);
			isDialogShowing = source.readInt() == 1;
			dialogBundle = source.readBundle();
		} 
 
		public SavedState(Parcelable superState) {
			super(superState);
		} 
 
		@Override 
		public void writeToParcel(Parcel dest, int flags) {
			super.writeToParcel(dest, flags);
			dest.writeInt(isDialogShowing ? 1 : 0);
			dest.writeBundle(dialogBundle);
		} 
	}