Thursday, May 2, 2013

[android-developers] Share Loader data for three fragments

Hi there,

I'm using ActionBarSherlock and a FragmentPagerAdapter to display three tabs which are each associated to a fragment.

Each fragment consists in a listview. The data are all the same for each listview, only difference is that they are filtered differently depending of the tab.

So for the moment, I got a Loader in each fragment that gets the data from a webservice. Because the data is the same for each fragment, I'd like to find a way to only get the data once and share it across all three fragments.

Can you guys give me some cues?

Thanks!

--
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments:

Post a Comment