title: Android text input from XML
body: <p>I am struggling to learn how XML layouts in android work.  I suspect my question has been asked before, but I can't find the answer.
  I am looking at the APIDemos tutorial that comes with the android SDK.  There is a class called AlertDialogSamples in it.  I am working with the custom DIAGLOG_TEXT_ENTRY case.  I understand how to get the view to be added to the dialog box and how to make the labels and text box change.
  I cannot understand how to get the user input text from the boxes and do somethign with it.  In the lines:</p>
  
  <pre><code>.setPositiveButton(R.string.alert_dialog_ok,
     new DialogInterface.OnClickListener() {
       public void onClick(DialogInterface dialog, int whichButton) {
           /* User clicked OK so do some stuff */
       }
  </code></pre>
  
  <p>How do I get the user input values of the username and password fields and use them where is says User clicked OK?  They should be EditText objects, but I am unfamiliar with how to access these fields since they are formed using XML instead of writting them in JAVA.  How do I access XML generated objects?</p>
  
  <p>Thank you</p>