Bit of a performance question. I have a fragment that fetched some data from the content provider and built an object which implements Parcelable.
MyObject object;
In the scenario where such objects is required in another fragment, what would be more convenient: pass the object as
args.putParcelable(ARG_KEY_OBJECT, object);
or pass the id of the object so that the new fragment can fetch it again from the content provider?
args.putString(ARG_KEY_OBJECT_ID, object.getId());
Furthermore: what if we're talking about a list of those objects?
ArrayList<MyObject> list = ....
args.putParcelableArrayList(ARG_KEY_OBJECT_LIST, list);