Programatically unchecking items in a dialog on Android -


i displaying list checkboxes in dialog. list looks like-

item 1  item 2  

with checkbox beside each item. requirements is- if item 1 or item 2 or both checked, , selected, item 1 & 2 should unchecked.

to accomplish this, implemented dialoginterface.onmultichoiceclicklistener 's onclick listener.

public void onclick(dialoginterface dialog, int which, boolean ischecked) {   if(which == 2 && ischecked)   {     ((alertdialog)dialog).getlistview().setitemchecked(0, false);     ((alertdialog)dialog).getlistview().setitemchecked(1, false);   } } 

but not work. tried invalidating listview calling invalidate() & invalidateviews(), no success.

any appreciated.

thanks,

akshay

i found answer-

how uncheck items in alertdialog (setmultichoiceitems)?

thanks!


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -