Code example for Parcel

Methods: readInt

0
    private static class SavedState extends BaseSavedState {
        boolean wasPositiveResult;
         
        public SavedState(Parcel source) {
            super(source);
            wasPositiveResult = source.readInt() == 1;
        } 
 
        @Override 
        public void writeToParcel(Parcel dest, int flags) {
            super.writeToParcel(dest, flags);
            dest.writeInt(wasPositiveResult ? 1 : 0);
        } 
 
        public SavedState(Parcelable superState) {
            super(superState);
        } 
 
        public static final Parcelable.Creator<SavedState> CREATOR =
                new Parcelable.Creator<SavedState>() { 
            public SavedState createFromParcel(Parcel in) {