[android-developers] Re: How get text from EditText filed which is showing in alert Dialog

2009-02-05 Thread muckwarrior
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

[android-developers] Re: How get text from EditText filed which is showing in alert Dialog

2009-02-05 Thread Emmanuel
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