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
Comments
Post a Comment