android - listAdapter in SherlockListFragment -


i want set listview, want activity among sherlock tabs.

here code

public class playlistactivity extends sherlocklistfragment{     // songs list     public arraylist<hashmap<string, string>> songslist = new arraylist<hashmap<string, string>>();      @override     public sherlockfragmentactivity getsherlockactivity() {         return super.getsherlockactivity();     }      @override     public void onviewcreated(view view, bundle savedinstancestate) {         super.onviewcreated(view, savedinstancestate);     }      @override     public view oncreateview(layoutinflater inflater, viewgroup container,             bundle savedinstancestate) {         // view fragmenttab3.xml         view view = inflater.inflate(r.layout.playlist, container, false);         arraylist<hashmap<string, string>> songslistdata = new arraylist<hashmap<string, string>>();          songsmanager plm = new songsmanager();         // songs sdcard         this.songslist = plm.getplaylist();          // looping through playlist         (int = 0; < songslist.size(); i++) {             // creating new hashmap             hashmap<string, string> song = songslist.get(i);              // adding hashlist arraylist             songslistdata.add(song);         }          // adding menuitems listview          listadapter ladapter = new simpleadapter(this, songslistdata,                 r.layout.playlist_item, new string[] { "songtitle" }, new int[] {                         r.id.songtitle }); 

i errors above here when declaring listadapter , says simpleadapter undefined. worked fine when class extended listactivity since want tabs , swipe extended sherlocklistactivity , guess class isn't available in sherlock way around this?

if not usign fragments extend activity sherlocklistactivity else extend activity class sherlockfragmentactivity , add sherlocklistfragment fragment.


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -