I'm in an Android project.

I want to show a AlertDialog on which the user can pick one item (about 100 items, it's dynamic). I want to add the possibility of searching also.
My real problem is that it seems I can't change the items once the Dialog is created.
The creation code:

```
// The List with the beaches with radio buttons, single choice!
public void showBeachesDialog(final Activity context, boolean isFromZonas)
{
    AlertDialog.Builder builder = new AlertDialog.Builder(context);

    searchAdapter = new SearchDialogAdapater(orderedBeaches, orderedBeachesIds, context);

    builder.setSingleChoiceItems(searchAdapter, -1, new DialogInterface.OnClickListener()
    {

        @Override
        public void onClick(DialogInterface dialog, int which)
        {
            index = which;
            if (!((AlertDialog) dialog).getButton(AlertDialog.BUTTON_POSITIVE).isEnabled())
                ((AlertDialog) dialog).getButton(AlertDialog.BUTTON_POSITIVE).setEnabled(true);
        }
    });     

    DialogOkOnClickListener listener = new DialogOkOnClickListener(context, isFromZonas);

    builder.setPositiveButton(R.string.searchOK, listener);

    builder.setNegativeButton(R.string.cancelar, new DialogInterface.OnClickListener()
    {
        public void onClick(DialogInterface dialog, int id)
        {
            // User cancelled the dialog: nothing happens
        }
    });

    builder.setIcon(context.getResources().getDrawable(R.drawable.icon_beach));
    builder.setTitle(StaticUtils.DIALOG_TITLE);

    View dialogView = context.getLayoutInflater().inflate(R.layout.dialog_beaches, null);
    SearchView searchView = (SearchView)dialogView.findViewById(R.id.search_beach);

    searchView.setOnQueryTextListener(new SearchQueryListener(searchAdapter));      

    builder.setView(dialogView);

    AlertDialog dialog = builder.create();
    dialog.show();

    dialog.getButton(Dialog.BUTTON_POSITIVE).setEnabled(false);
}

```

So, now I have the dialog with all the elements I want (the SearchDialogAdapater is fine).
The DialogOnClickListener is also working.
The search view is appearing on the dialog, and my SearchQueryListener is working perfectly, so I won't post here the code, but in Debug I can see that if I type "d" the elements without the "d" are filtered out.

Now I would like to not throw away all the code and find a way to change the items of the dialog without showing a new one... 

Sorry for long question and if there is a obvious way I am missing...

Thank you all.