Android Tabs Content for better User Experience -
i have activity has 3 tabs fragments.
- featured
- up coming
- favorites
right implement when click particular tab downloads content internet , displays it.
when browsing through google play app. found when went app section content across tabs featured - top free - top paid etc
there , images lazy loading.
i trying figure out how can implemented.
in app have activity wich has 4 tabs wich fragments..
i solved explained problem using singleton. load relevant information sqlite database , pass arraylist in singletion.. can access content every fragment...
public class singleton { private static singleton instance = null; public arraylist<myobject> myobjectlist; protected singleton() { // exists defeat instantiation. } public static singleton getinstance() { if(instance == null) { instance = new singleton(); myobjectlist = new arraylist<myobject>(); } return instance; } }
Comments
Post a Comment