title: How to read/write int in Parcelable object?
body: <p>My int variables are not reading/writing correctly in my Parcelable object.
  I am passing my object from one activity to another but the int variables are not the same once I pass it and read it.</p>
  
  <p>Heres my code.</p>
  
  <p>PARCELABLE OBJECT:</p>
  
  <pre><code>class someObject implements Parcelable
  int something;
  int something2;
  
  //normal constructor
  ... 
  
  public someObject(Parcel in){
    this.something = in.readInt();
    this.something2 = in.readInt();
  }
  
  public void writeToParcel(Parcel dest, int flags){
     dest.writeInt(something);
     dest.writeInt(something2);
  }
  //creator and other parcel stuff
  ...
  
  //mutators for int variables
  ...
  </code></pre>
  
  <p>How I passed it in activity1:</p>
  
  <pre><code>//instantiate someObject 
  ...
  Intent intent = new Intent(activity1.this, activity2.class);
  intent.putExtras("stuff", someObject);
  </code></pre>
  
  <p>Passed to activity2:</p>
  
  <pre><code>onCreate(Bundle blah){
  Bundle b = getIntent.getExtras();
  someObject some = b.getParcelable("stuff");
  
  }
  </code></pre>
  
  <p>I output something and something2 within the constructor and the activity that I pass it too. They are different values, what did I do wrong?</p>
  
  <p>I have other String member variables in my parcelable object class and they seem to work. Just the 2 ints are not working properly.</p>