Code example for Parcel

Methods: readValue

0
        SavedState(Parcelable superState) {
            super(superState);
        } 
  
        private SavedState(Parcel in) {
            super(in);
            checked = (Boolean)in.readValue(null);
        } 
  
        @Override 
        public void writeToParcel(Parcel out, int flags) {
            super.writeToParcel(out, flags);
            out.writeValue(checked);
        } 
  
        @Override 
        public String toString() {
            return "CheckableLinearLayout.SavedState{" 
                    + Integer.toHexString(System.identityHashCode(this))
                    + " checked=" + checked + "}";
        }