Code example for Parcel

Methods: readBundle, readInt

0
    boolean isDialogShowing;
    Bundle dialogBundle;
 
    public SavedState(Parcel source) {
      super(source);
      isDialogShowing = (source.readInt() != 0);
      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);
    } 
 
    @SuppressWarnings({"hiding", "unused"})