How uncheck items in AlertDialog (setMultiChoiceItems)?

前端 未结 4 1711
广开言路
广开言路 2020-12-06 16:49

I\'d like to clear selected items when the total came to three items selected, I am doing as follows but is not working ...

AlertDialog.Builder builder = new         


        
4条回答
  •  感动是毒
    2020-12-06 17:31

    Seeing Jorgesys answer in this question I realized what was missing in my code, is necessary to change the boolean list too.

            selected[which] = false;
            ((AlertDialog) dialog).getListView().setItemChecked(which, false);
    

提交回复
热议问题