title: EditText not returning content on getText()
body: <p>The code snippet below displays a Dialog with a simple login-form. The problem is that when the user hits the login-button, the text that was entered into the EditTexts are not returned on the getText()-call. However, if I set android:setText="foo" on the EditTexts in the xml-layout "foo" is returned on getText(). Any idea why the text entered at runtime won't stick?</p>
  
  <pre><code>private void showLoginDisplay() {
      loginDialog = new Dialog(GOFdroid.this);
      loginDialog.getWindow().setFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND, 
                                  WindowManager.LayoutParams.FLAG_BLUR_BEHIND);
      loginDialog.setTitle("Logga in");
  
      LayoutInflater li = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
      View dialogView = li.inflate(R.layout.login_dialog, null);
      loginDialog.setContentView(dialogView);
  
      loginDialog.show();
  
      Button loginButton = (Button) dialogView.findViewById(R.id.login_button);
      Button cancelButton = (Button) dialogView.findViewById(R.id.cancel_button);
  
      EditText unameView = (EditText) dialogView.findViewById(R.id.uname_id);
      if (unameView != null)
          Log.d(TAG, "unameView != null");
          Log.d(TAG, "uname.getText(): " + unameView.getText().toString());
          uname = unameView.getText().toString();
  
      EditText pwdView = (EditText) dialogView.findViewById(R.id.pwd_id);
      if (pwdView != null)    
          pwd = pwdView.getText().toString();
  
      Log.d(TAG, "uname = " + uname + ", pwd = " + pwd);
  
      loginButton.setOnClickListener(new OnClickListener() {
          //@Override
          public void onClick(View v) {
              Log.d(TAG, "Clicked &lt;logga in&gt;");
  
              loginDialog.dismiss();
  
              viewEvents = new Runnable() {
                  //@Override
                  public void run() {
                      getEvents(uname, pwd);
                  }
              };
  
              Thread thread =  new Thread(null, viewEvents, "MagentoBackground");
              thread.start();
              pDialog = ProgressDialog.show(GOFdroid.this,    
                      "Uppdaterar...", "Hämtar registrerade körningar...", true);
          }
      });
  }
  </code></pre>
  
  <p>and the XML:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:orientation="vertical"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:paddingLeft="10dip"
      android:paddingRight="10dip"
  &gt;
  &lt;TextView
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:text="@string/uname_label"/&gt;
  &lt;EditText
      android:id="@+id/uname_id"
      android:layout_width="220dip"
      android:layout_height="wrap_content"
      android:text="foo" /&gt;
  &lt;TextView
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:text="@string/pwd_label"
      android:paddingTop="10dip"/&gt;
  &lt;EditText
      android:id="@+id/pwd_id"
      android:layout_width="220dip"
      android:layout_height="wrap_content"
      android:text=""
      android:inputType="textPassword" /&gt;
  &lt;LinearLayout
      android:orientation="horizontal"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:paddingTop="15dip"
  &gt;
  &lt;Button 
      android:id="@+id/login_button"
      android:layout_width="100dip"
      android:layout_height="fill_parent"
      android:text="Logga in" /&gt;
  &lt;Button 
      android:id="@+id/cancel_button"
      android:layout_width="100dip"
      android:layout_height="fill_parent"
      android:text="Avbryt" /&gt;
  &lt;/LinearLayout&gt;
  &lt;/LinearLayout&gt;
  </code></pre>