Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resource implement Parcelable #79

Open
dreamsbond opened this issue Feb 20, 2018 · 3 comments
Open

Resource implement Parcelable #79

dreamsbond opened this issue Feb 20, 2018 · 3 comments

Comments

@dreamsbond
Copy link

Is there any sample illustrating the use of Parcelable for bundle parameter transfer? thanks

@dreamsbond
Copy link
Author

dreamsbond commented Feb 20, 2018

i am having problem doing readParcelable,
for example:

    public static final Parcelable.Creator<Room> CREATOR = new Creator<Room>() {
        @Override
        public Room createFromParcel(Parcel parcel) {
           Room room = new Room();

            room.setId(parcel.readString());
            room.setRoomType(parcel.readParcelable(Room.class.getClassLoader()));

            return room;
        }

        @Override
        public Room[] newArray(int i) {
            return new Room[i];
        }
    };

Change the setter did help, retrieving the relationship:

    public void setRoomType(ResourceIdentifier roomType) {
        this.roomType = new HasOne<>(roomType);
    }

did help show room type relation (HasOne linkedResource) but fail to retrieve its attribute via getDocument() method.

please help.

@onemonster
Copy link

Any update on this issue?

@xdbas
Copy link

xdbas commented Mar 20, 2020

Will Parcelable be implemented?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants