Code example for Parcel

Methods: writeIntwriteValue

0
        return 0;  //To change body of implemented methods use File | Settings | File Templates. 
    } 
 
    @Override 
    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeValue(sender);
        parcel.writeValue(message);
        parcel.writeValue(date);
        parcel.writeInt(type);
    } 
 
    public static final Parcelable.Creator<Message> CREATOR = new Parcelable.Creator<Message>() {
        public Message createFromParcel(Parcel in) { 
            return new Message( 
                    in); 
        } 
 
        public Message[] newArray(int size) { 
            return new Message[size]; 
        } 
Stop searching for code, let great code find you!  Add Codota to your java IDE
4
CodeRank