Android Tabs Content for better User Experience -


i have activity has 3 tabs fragments.

  1. featured
  2. up coming
  3. 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

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -