android - SherlockFragmentActivity - How to create tabs and setContent in it? -


i using sherlockfragmentactivity create tabs. first time when working on kind of stuff. want create 4 tabs contacts, groups, gallery, activities tab full functionality. have created these tabs find little difficult add seperate activity each tabs. if can provide me kind of tutorial , or hint learn them , apply in appplication. thankful you.

my problem related loadermanager because application stopped when getloadermanager().initloader(0,null,this); function called. have given loader function below

public loader<cursor> oncreateloader(int id, bundle args) {              // called when new loader needs created.              // sample has 1 loader, don't care id.             // first, pick base uri use depending on whether             // filtering.             uri baseuri;             if (mcurfilter != null) {                 baseuri = uri.withappendedpath(contactscontract.contacts.content_filter_uri,                           uri.encode(mcurfilter));             } else {                 baseuri = contactscontract.contacts.content_uri;             }              // create , return cursorloader take care of             // creating cursor data being displayed.             string select = "((" + contactscontract.contacts.display_name + " notnull) , ("                     + contactscontract.contacts.has_phone_number + "=1) , ("                     + contactscontract.contacts.display_name + " != '' ))";             return new cursorloader(getactivity(), baseuri,                     contacts_summary_projection, select, null,                     contactscontract.contacts.display_name + " collate localized asc");         }          public void onloadfinished(loader<cursor> loader, cursor data) {             // swap new cursor in.  (the framework take care of closing             // old cursor once return.)             madapter.swapcursor(data);              // list should shown.             if (isresumed()) {                 setlistshown(true);             } else {                 setlistshownnoanimation(true);             }         }          public void onloaderreset(loader<cursor> loader) {             // called when last cursor provided onloadfinished()             // above closed.  need make sure no             // longer using it.             madapter.swapcursor(null);         } 


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -