java - How can i create a custom listview in SherlocklistActivity? -


i have not worked on sherlock wanna create sherclockactionbar interface 2 3 tabs @ 1 tab wanna have listview sub item text works on simple activity not working in sherlockfragmentactivity.and wanna disable title bar have disable on android 3.0 , greater still showing on android version less 3.0.

public class fragmentlistarraysupport extends sherlockfragmentactivity {  @override protected void oncreate(bundle savedinstancestate) {     settheme(samplelist.theme); //used theme switching in samples     super.oncreate(savedinstancestate);      // create list fragment , add our sole content.     if (getsupportfragmentmanager().findfragmentbyid(android.r.id.content) == null) {         arraylistfragment list = new arraylistfragment();         getsupportfragmentmanager().begintransaction().add(android.r.id.content, list).commit();     } }  public static class arraylistfragment extends sherlocklistfragment {   public static final string[] items = ("first","second","third");      @override     public void onactivitycreated(bundle savedinstancestate) {         super.onactivitycreated(savedinstancestate);         setlistadapter(new arrayadapter<string>(getactivity(),                 android.r.layout.simple_list_item_1, items));     }      @override     public void onlistitemclick(listview l, view v, int position, long id) {         log.i("fragmentlist", "item clicked: " + id);     } } } 


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -