Hi, I follow the following example in creating a Parcelable object: http://code.google.com/android/reference/android/os/Parcelable.html
And I did the following to unit test the CREATOR and writeToParcel method: Parcel dummyParcel = Parcel.obtain(); MyParcelable p = new MyParceable("12345"); p.writeToParcel(dummyParcel, Parcelable.PARCELABLE_WRITE_RETURN_VALUE); MyParcelable p2 = MyParcelable.CREATOR.createFromParcel(dummyParcel); System.out.println ("******** " + p.toString()); System.out.println ("******** " + p2.toString()); when I execute the method, p2 is empty. I step thru the code, the private MyParcelable(Parcel in) { mData = in.readInt(); } did get called. But the readInt() return 0. Can you please tell me what am I missing? Thank you. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---