title: Android: Getting error when pass an object to an Activity implementing Parceable
body: <p>I'm passing an object to an Activity implementing Parceable but when I try to get it I get error. I'm following this <a href="https://stackoverflow.com/questions/7400100/android-parcelable-object-return-null">Android Parcelable object return Null</a> but I can't see where is the error. Can you please help me?</p>
  
  <p><strong>Ver_Activity.java</strong></p>
  
  <pre><code>(...)
  ArrayList&lt;Grafico&gt; graficos;
  (...)
  intent = new Intent(VerActivity.this, Ver_GraficosActivity.class);
  intent.putParcelableArrayListExtra("graficos", graficos);
  startActivity(intent);
  </code></pre>
  
  <p><strong>Ver_Graficos.java</strong></p>
  
  <pre><code>public class Ver_GraficosActivity extends ActionBarActivity{
  
      private static int[] COLORS = new int[] { Color.GREEN, Color.BLUE,Color.MAGENTA, Color.CYAN };
      DatabaseHelper databaseHelper;
      private CategorySeries mSeries = new CategorySeries("");
      private DefaultRenderer mRenderer = new DefaultRenderer();
      private GraphicalView mChartView;
      private double []values=new double []{};
      private String []legenda=new String[]{};
      //ArrayList&lt;Grafico&gt; graficos = new ArrayList&lt;Grafico&gt;(){};
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_ver__graficos);
  
    ArrayList&lt;Grafico&gt; graficos=getIntent().getParcelableArrayListExtra("graficos");
  </code></pre>
  
  <p><strong>Grafico.class</strong></p>
  
  <pre><code>public class Grafico implements Parcelable {
  
      private int despesa;
      private String categoria;
      private double percentagem;
  
      public Grafico(){}
  
      public Grafico(int despesa, String categoria, double percentagem ) {
          this.despesa = despesa;
          this.categoria = categoria;
          this.percentagem = percentagem;
      }
  
      public Grafico(int despesa, String categoria) {
          this.despesa = despesa;
          this.categoria = categoria;
      }
  
      private Grafico(Parcel in) {
          // This order must match the order in writeToParcel()
          this.categoria = in.readString();
          this.despesa = in.readInt();
          this.percentagem = in.readDouble();
          // Continue doing this for the rest of your member data
      }
  
      public int getDespesa() {
          return despesa;
      }
  
      public void setDespesa(int despesa) {
          this.despesa = despesa;
      }
  
      public double getPercentagem() {
          return percentagem;
      }
  
      public void setPercentagem(double percentagem) {
          this.percentagem = percentagem;
      }
  
      public String getCategoria() {
          return categoria;
      }
  
      public void setCategoria(String categoria) {
          this.categoria = categoria;
      }
  
      // Just cut and paste this for now
      public int describeContents() {
          return 0;
      }
  
      public void writeToParcel(Parcel out, int flags) {
          out.writeInt(this.despesa);
          out.writeString(this.categoria);
          out.writeDouble(this.percentagem);
      }
  
      public static final Parcelable.Creator&lt;Grafico&gt; CREATOR = new Parcelable.Creator&lt;Grafico&gt;() {
          public Grafico createFromParcel(Parcel in) {
              return new Grafico(in);
          }
  
          public Grafico[] newArray(int size) {
              return new Grafico[size];
          }
      };
  }
  </code></pre>
  
  <p><strong>Error:</strong></p>
  
  <pre><code>FATAL EXCEPTION: main Process: com.android., PID: 8317
          java.lang.RuntimeException: Unable to start activity ComponentInfo{.Ver_GraficosActivity}: java.lang.RuntimeException: Parcel android.os.Parcel@26d3f280: Unmarshalling unknown type code 7340147 at offset 320
                  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2298)
                  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360)
                  at android.app.ActivityThread.access$800(ActivityThread.java:144)
                  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)
                  at android.os.Handler.dispatchMessage(Handler.java:102)
                  at android.os.Looper.loop(Looper.java:135)
                  at android.app.ActivityThread.main(ActivityThread.java:5221)
                  at java.lang.reflect.Method.invoke(Native Method)
                  at java.lang.reflect.Method.invoke(Method.java:372)
                  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
                  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
           Caused by: java.lang.RuntimeException: Parcel android.os.Parcel@26d3f280: Unmarshalling unknown type code 7340147 at offset 320
                  at android.os.Parcel.readValue(Parcel.java:2222)
                  at android.os.Parcel.readListInternal(Parcel.java:2520)
                  at android.os.Parcel.readArrayList(Parcel.java:1836)
                  at android.os.Parcel.readValue(Parcel.java:2167)
  </code></pre>