I have an AlertDialog
which it has dynamic items linked to a Cursor from database , it works fine but i wanted to disable user interaction with that because it's an informational dialog , i've disabled my dialog with :
alert.getListView().setEnabled(false);
but the problem is when Items in the list are bigger than the dialog height , because of disabling it's ListView, Scrolling is disabled too and some items doesn't show up, i've tried some links like : Android : How to disable CheckBox in AlertDialog? with no success. i've also tried :
builder.setMultiChoiceItems(mDBAdapter.instance.getName(SupervisorGuid)
, SyncDBHelper.instance.SentSupervisors(SupervisorGuid),new DialogInterface.OnMultiChoiceClickListener() {
@Override
public void onClick(DialogInterface dialog, int which,
boolean isChecked) {
if(isChecked==true)
{
((AlertDialog) dialog).getListView().setItemChecked(which, false);
}
else
{
((AlertDialog) dialog).getListView().setItemChecked(which, true);
}
}});
AlertDialog alert = builder.create();
Does anybody know a better way to disable the checkboxes without a Custom dialog? Thanks in Advance.
this may give you some idea...