title: Edittext to String
body: <p>On the Android I'm trying to turn an <code>Edittext</code> to a string. The <code>toString()</code> method doesn't work, playerName is null when I print it out. Are there any other ways to turn an edittext to a string?</p>
  
  <pre><code>AlertDialog.Builder alert = new AlertDialog.Builder(this);
          alert.setMessage("Your Name");
          final EditText input = new EditText(this);
          alert.setView(input);
          alert.setPositiveButton("Ok", new DialogInterface.OnClickListener() {
              public void onClick(DialogInterface dialog, int whichButton) {
                  playerName = input.getText().toString();
              }
          });
          alert.show();
  </code></pre>