How to select all item programatically in AlertDialgue Multichoice button in Android -


hi new android development have alertdialog multichoice button want set 1 button clicking button item in alertdialog list automatically select programmaticaly.

but unable find way kindly me in regards.

you can this:

.setneutralbutton(r.string.set_all,                      new dialoginterface.onclicklistener() {                 public void onclick(dialoginterface dialog, int id) {                     listview list = ((alertdialog) dialog).getlistview();                     (int i=0; < list.getcount(); i++) {                         list.setitemchecked(i, true);                     }                 }      }) 

unfortunately, button dismisses dialog if not want it. intended behavior: a link google issue


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -