android - custom listview inside custom dialog -


i want ask listview , dialog

i have dialog show custom layout edit text, text view, , listview

the problems is, when dialog loaded up, everthings inside dialog work fine handled clicklistener, but...

the listview not responding onitemclicklistener...

ive search theres no solution problems... hope can me figure out... many ^^

here code

li            = layoutinflater.from(this);         somelayout    = (linearlayout)li.inflate(r.layout.d_bon_rokok_add_main, null);          lbldate       = (textview)somelayout.findviewbyid(r.id.d_bonrokokaddmain_lbltgl);         txtstartdate  = (edittext)somelayout.findviewbyid(r.id.d_bonrokokaddmain_txtstartdate);         lblto         = (textview)somelayout.findviewbyid(r.id.d_bonrokokaddmain_lblto);         txtenddate    = (edittext)somelayout.findviewbyid(r.id.d_bonrokokaddmain_txtenddate);         btnsearch     = (button)somelayout.findviewbyid(r.id.d_bonrokokaddmain_btnsearch);         ll_add        = (linearlayout)somelayout.findviewbyid(r.id.d_bonrokokaddmain_llbottom);         btnsave_add   = (button)somelayout.findviewbyid(r.id.d_bonrokokaddmain_btnnext);         btncancel_add = (button)somelayout.findviewbyid(r.id.d_bonrokokaddmain_btncancel);         lvdialog = (listview)somelayout.findviewbyid(r.id.d_bonrokokaddmain_lvdialog);          initializedate_d();          cbrokokadd      = (checkbox)somelayout.findviewbyid(r.id.d_bonrokokaddmain_cbnewform);         cbheaderdialog  = (checkbox)somelayout.findviewbyid(r.id.d_bonrokokaddmain_cbheader);          cbrokokadd.setchecked(true);          hidewidget();          cbrokokadd.setoncheckedchangelistener(switchcontrol);         txtstartdate.setonclicklistener(dialogstartdate);         txtstartdate.setkeylistener(null);         txtenddate.setonclicklistener(dialogenddate);         txtenddate.setkeylistener(null);           dialogitemlist = login.dbresetdata.getsalesplan();         final bonrokok_salesplan_adapter dialogadapter = new bonrokok_salesplan_adapter(this, dialogitemlist);         lvdialog.setadapter(dialogadapter);          cbheaderdialog.setoncheckedchangelistener(cbheadercontrol);          lvdialog.setonitemclicklistener(new onitemclicklistener() {              @override             public void onitemclick(adapterview<?> parent, view view,                     int position, long id) {                 log.d("result", "hey it`s work!!!");              }         });          alert = new dialog(this);         alert.requestwindowfeature(window.feature_no_title);         btnsave_add.setonclicklistener(dialogyes);         btncancel_add.setonclicklistener(dialogno);         alert.setcontentview(somelayout);          alert.getwindow().getattributes().width = layoutparams.fill_parent;         alert.getwindow().getattributes().height = layoutparams.wrap_content;         alert.show(); 


Comments

Popular posts from this blog

qml - Is it possible to implement SystemTrayIcon functionality in Qt Quick application -

double exclamation marks in haskell -

javascript - How to get D3 Tree link text to transition smoothly? -