I have two object like these that I want to send through Intent
implementing Parcelable
interface:
class Foo implements Parcelable
{
private Bar bar;
public void writeToParcel(Parcel dest, int flags)
{
dest.writeParcelable(bar, flags);
}
}
class Bar implements Parcelable
{
private Foo foo;
public void writeToParcel(Parcel dest, int flags)
{
dest.writeParcelable(foo, flags);
}
}
How can I implement correctly the Parcelable
interface?