Code example for Parcel

Methods: writeIntwriteLongwriteParcelablewriteString

0
 
    @Override 
    public int describeContents() { return 0; } 
    @Override 
    public void writeToParcel(final Parcel dest, final int flags) {
      dest.writeLong(id);
      dest.writeString(title);
      dest.writeString(description);
      dest.writeParcelable(uri, flags);
      dest.writeParcelable(destinationUri, flags);
      dest.writeInt(success ? 1 : 0);
    } 
 
    /** @return the id */ 
    public long getId() { return id; }
    /** @param id the id to set */ 
    public void setId(final long id) { this.id = id; }
    /** @return the title */ 
    public String getTitle() { return title; }
    /** @param title the title to set */