java - How to display parameter in a single item's detail and not in a single listview item -


i'm trying solve i'm not sure about. wants show parameter call "decription" in single item's detail when single listview item selected "decription" should not displayed on single listview item. know problem lies i'm not sure how solve it. please kindly give me suggestions! here code mistake lies:

// adding menuitems listview     listadapter adapter = new simpleadapter(this, menuitems,                     r.layout.list_item, new string[] { key_title, key_desc, key_country_name,                             key_venue_name, key_start_time }, new int[] {                             r.id.title,r.id.description, r.id.countryname, r.id.venuename,                             r.id.starttime });              setlistadapter(adapter);              // selecting single listview item             listview lv = getlistview();              lv.setonitemclicklistener(new onitemclicklistener() {                  @override                 public void onitemclick(adapterview<?> parent, view view,                         int position, long id) {                     // getting values selected listitem                     string title = ((textview) view.findviewbyid(r.id.title))                             .gettext().tostring();                     string description = ((textview) view                             .findviewbyid(r.id.description)).gettext().tostring();                      // starting new intent                     intent in = new intent(getapplicationcontext(),                             singlemenuitemactivity.class);                     in.putextra(key_title, title);                     in.putextra(key_desc, description);                      startactivity(in);                  } 

as can see, key_desc 1 i'm talking about, in order me use in.putextra(key_desc, description); me use in.getstringextra class. description gets r.id.description field declared in listadapter, displayed in listview items. wants remove description listview items still able use in.putextra(key_desc, ??) method. may know should do?

if don't want description shown in main list, remove ui element represents description res/layout/list-item.xml (it textview id=@description).

in case won't see description, still available throught simpleadapter.


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -