Reputation: 1858
I am considering different methods of passing an object from one fragment to another. I have read that passing a serialized version of an object between fragments can be a somewhat heavy transaction.
Would an alternative such as using GSON library to convert an object to JSON, and then passing the JSON string between fragment be a less memory intensive solution?
Upvotes: 2
Views: 450
Reputation: 9234
Parcelable is the best option when it comes to passing data between Fragments. Its Android way of serializing the data and passing it between Activity and Fragments efficiently.
This answer might help you also.
Upvotes: 1