I encountered the same problem. This is how I solved it:
Declare a field
private AlertDialog myDialog;
Then when creating your dialog
myDialog = new AlertDialog..
.
public void onClick(DialogInterface dialog, int whichButton) {
DoSomethingWithDialogContent();
}
.
private
As Romain said you're getting the content from your activity ( that
don't possess a username_edit item ).
you should do :
...
Dialog curDialog = (Dialog) dialog;
EditText enterNumberField = (EditText) curDialog.findViewById
(R.id.username_edit);
...
It works for me...
Emmanuel
2 matches
Mail list logo