Is it possible to show Alert Dialog with Multi Choice with disabled items(Rows) in the list? By checking "None" Option in the list all options in the list should get disabled except option "None", if i uncheck option "None" need to enable all the items once again?
AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(context);
dialogBuilder.setMultiChoiceItems(optionsList,selectionState,new
DialogInterface.OnMultiChoiceListener()
{
@Override
public void onClick(DialogInterface dialog,int which, boolean isChecked){
final AlertDialog alertDialog = (AlertDialog) dialog;
final ListView alertDialogList = alertDialog.getListView();
// Here how to make the items in the list as disabled when None is clicked
// None OPtion is one among in optionsList string array
// A loop to disable all items other than clicked one
for (int position = alertDialogList.getCheckedItemPosition(); position<
alertDialogList.getChildCount; position++)
{
alertDialogList.getChildAt(position).setEnabled(false);
}
}
});