java - How do I get the default views for a ListView Section Headers and items? -
i want replicate list of sidebar/action bar dropdown in gmail--namely, nice all-cap section headers , items faded number on right. know need create own spinneradapter, i've started. i'm stuck how these standard views , put desired text in right sub-views (with guess view.findviewbyid
). can point me in right direction?
public view getdropdownview(int position, view convertview, viewgroup parent) { context context = parent.getcontext(); object item = getitem(position); layoutinflater inflater = (layoutinflater)context.getsystemservice (context.layout_inflater_service); if (item instanceof string) { string headertext = (string) item; // todo: inflate ics section header view, // populate headertext, , return } else { listitem listitem = (listitem) item; // todo: inflate ics text/number view, populate // listitem.gettext()/getnumber() , return } }
here's visual reference of i'm talking about: ics gmail app on transformer prime
Comments
Post a Comment