简体   繁体   中英

How to pass an entire Parseobject from a fragment to activity?

What's the best way to pass a ParseObject from a fragment to an activity? Right now, I'm just passing the objectId through the intent and retrieving that value on the other end to make a query for the object. It works, but I'd like to how to pass in a ParseObject so I wouldn't have to make a query.

您可以尝试从此处使用该解决方案: https ://www.parse.com/questions/passing-around-parseobjects-in-android,尽管他说这仅适用于原始类型

You can try some kind of static cache in your app. For example, create a static class that hold the reference for the object and keep them live between activities and fragments.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM