It took me a long time to figure out how to do this.

To pass an arbitrary object reference using an Intent, you must create
a Binder that has a reference to your object.  Then you must create a
Parcelable that adds an instance of the Binder to a Parcel.  See the
section titled "Active Objects" of the documentation for the Parcel
class.  You can then put and get your Parcelable from an Intent.

On Apr 8, 6:47 am, jpopop <[email protected]> wrote:
> I have two class, class A and B, B includ class A, like this:
>
> class A
> {
>     int a;
>     int b;
>
> }
>
> class B
> {
>    A a; //this is Class A
>    int b;
>
> }
>
> class B should implement like this
>
> class B extends parcelable
> {
>     //how to implement WriteToParcel and ReadFromParcel functions in
> class B in order to write/read object A???
>
> }
>
> it is better give example for writetoparcel and readfromparcel????

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to