I thought I understood how to read/write from a parcel, but now I'm getting stuck. In one of my parcelable objects, I have this function
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeInt(7);
int testInt = dest.readInt();
Log.d("test","INT = " + testInt);
}
which gets run correctly when the state of the activity is saved. This outputs
INT = 0
which I assume is because I'm not correctly writing / reading to the parcel. Or maybe you're not allowed to write and read immediately. What am I doing wrong?