Skip to content Skip to sidebar Skip to footer

Save Fragment Objects

I have an Activity that Displays Fragments one at a time , now each fragment load it data from server and keep fetching data in a list , the user can display another fragment in t

Solution 1:

One option is to override saveInstanceState in your Fragments and/or Activites in order to persist data and later retrieve it from the Bundle that gets passed into onActivityCreated/onCreate.

If you are dealing with large sets of data, you may be better off using another persistence mechanism like the SQLite database

Post a Comment for "Save Fragment Objects"