Code example for Parcel

Methods: writeBooleanArraywriteBundle

        public void writeToParcel(Parcel out, int flags) {
            super.writeToParcel(out, flags);
            Bundle bundle = new Bundle();
            bundle.putSerializable("ids", ids);
            bundle.putSerializable("type", type);
            out.writeBooleanArray(new boolean[]{this.disappear, this.visible});
        //required field that makes Parcelables from a Parcel 
        public static final Parcelable.Creator<SavedState> CREATOR =
                new Parcelable.Creator<SavedState>() { 
                    public SavedState createFromParcel(Parcel in) { 
                        return new SavedState(in); 
                    public SavedState[] newArray(int size) { 
                        return new SavedState[size]; 
Stop searching for code, let great code find you!  Add Codota to your java IDE