title: Alert dialog builder with edit text
body: <p>I am using an Alert dialog box to edit textview widgets. Can the edittext be populated with user text when dialog pops up? I see there are places for custom tiles, icons and buttons but no input message. alterdialog is triggered with an onlcicklistener which gets the text form the textview.</p>
  
  <pre><code>        @Override
  public void onClick(View item) {
  
      switch (item.getId()) {
      case R.id.textView1:
          strEditText = Title1.getText().toString();
          Log.d("TAG", strEditText);
          strReturn = SetDialogBox(strEditText);
          Title1.setText(strReturn);
  
          break;
  </code></pre>
  
  <p>Altertdialog</p>
  
  <pre><code>        private String SetDialogBox(String strEditText) {
  
      AlertDialog.Builder alert = new AlertDialog.Builder(this);
  
      alert.setTitle("Title");
      // alert.setMessage("Message");
  
      // Set an EditText view to get user input
      final EditText input = new EditText(this);
  
      alert.setView(input);
      alert.setPositiveButton("Ok", new DialogInterface.OnClickListener() {
          public void onClick(DialogInterface dialog, int whichButton) {
              Editable value = input.getText();
  
          //  Log.d("TAG", Editable);
  
          }
      });
  
      alert.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
          public void onClick(DialogInterface dialog, int whichButton) {
              // Canceled.
          }
      });
  
      alert.show();
      return strReturn;
  
  }
  </code></pre>
  
  <p>Resolved text edit added line after final EditText input = new EditText(this);</p>
  
  <pre><code>            input.setText(strEditText);
  </code></pre>