Code example for Parcel

Methods: writeIntwriteLongwriteParcelablewriteString

0
 
        /** 
         * Helper for making subclasses parcelable. 
         */ 
        protected void writeToParcel(Parcel p) {
            p.writeInt(type);
            p.writeString(label);
            p.writeString(data);
            p.writeParcelable(uri, 0);
            p.writeLong(id);
            p.writeInt(maxLines);
            p.writeString(mimetype);
        } 
 
        /** 
         * Helper for making subclasses parcelable. 
         */ 
        protected void readFromParcel(Parcel p) {
            final ClassLoader loader = getClass().getClassLoader();
            type = p.readInt();
Stop searching for code, let great code find you!  Add Codota to your java IDE