i have app many activities , class. profile, friends, photos, news feed, etc. want integrate sliding drawer main activities. in examples, showing array list implement onclick. question how change array list become activities friends, profile, home , etc.
you can use listview custom adapter. adjust custom adapter can link in listview adapter. , in adapter can put custom icon
public view getview(int position, view convertview, viewgroup parent) { layoutinflater inflator = (layoutinflater)context.getsystemservice(context.layout_inflater_service); view rowview = inflator.inflate(r.layout.row, parent, false); imageview icon = (imageview) rowview.findviewbyid(r.id.row_icon); textview title = (textview) rowview.findviewbyid(r.id.row_title); title.settext(promenu[position]); string s = promenu[position]; if(s.equalsignorecase("home")){ icon.setimageresource(r.drawable.icon_home); } else if(s.equalsignorecase("best nearby")){ icon.setimageresource(r.drawable.specialss); }
Comments
Post a Comment