title: How to read and write Enum into parcel on Android?
body: <p>Here is my model class:</p>
  
  <pre><code>public enum Action {
      RETRY, SETTINGS
  }
  
  private int imageId;
  private String description;
  private String actionName;
  private Action action;
  
  public NetworkError(int imageId, String description, String actionName, Action action ) {
      this.imageId = imageId;
      this.description = description;
      this.actionName = actionName;
      this.action = action;
  }
  
  public int getImageId() {
      return imageId;
  }
  
  public void setImageId(int imageId) {
      this.imageId = imageId;
  }
  
  public String getDescription() {
      return description;
  }
  
  public void setDescription(String description) {
      this.description = description;
  }
  
  public String getActionName() {
      return actionName;
  }
  
  public void setActionName(String actionName) {
      this.actionName = actionName;
  }
  
  
  @Override
  public int describeContents() {
      return 0;
  }
  
  @Override
  public void writeToParcel(Parcel dest, int flags) {
      dest.writeInt(this.imageId);
      dest.writeString(this.description);
      dest.writeString(this.actionName);
  }
  
  protected NetworkError(Parcel in) {
      this.imageId = in.readInt();
      this.description = in.readString();
      this.actionName = in.readString();
  }
  
  public static final Parcelable.Creator&lt;NetworkError&gt; CREATOR = new Parcelable.Creator&lt;NetworkError&gt;() {
      @Override
      public NetworkError createFromParcel(Parcel source) {
          return new NetworkError(source);
      }
  
      @Override
      public NetworkError[] newArray(int size) {
          return new NetworkError[size];
      }
  };
  </code></pre>