In my application, I display a dialog box with the following code:
final AlertDialog.Builder builder = new AlertDialog.Builder(
getActivity());
final View myDialogForm = getActivity().getLayoutInflater()
.inflate(R.layout.my_dialog, null);
builder.setTitle(R.string.addCompanyDialogTitle)
.setView(myDialogForm)
.create()
.show();
It contains a Spinner
and a TextView
. When the user selects something in the spinner, the text view must be updated.
How can I implement this (react to spinner selection in a dialog box generated by AlertDialog.Builder
) ?