I created a dialog box that displays a list of items that can be checked using AlertDialog.builder.
I set the initial set of element names and their check state, thus:
builder.setMultiChoiceItems( saveTargets.names, saveTargets.checked, new DialogInterface.OnMultiChoiceClickListener() {
In my dialog box, I added a button that creates a new item that needs to be shown and can be selected in a list with multiple selections.
How can I ask Dialog to update the list to display a new item?
I added it to my saveTargets variables, but you need to configure the new data as a list in the alerts dialog.
I tried using the cursor to set up multiple selections. I cannot use this for other reasons.
I looked at getting the ListView and adapter from the alert dialog, but I see no calls to update the array of names and check the status.
source share