title: how to handle empty text from the input alert dialog and control the alert button
body: <p>I have an <code>alert dialog</code> and I have an input from the <code>alert dialog</code>. The current issue is I cant handle the input from the <code>alert dialog</code> if the user didnt input any text and click ok button. How to set the <code>textfield</code> showing error if user didnt input any text and click OK button and without closing the <code>alert dialog</code>. Below is my code.</p>
  
  <pre><code> final AlertDialog.Builder builder = new AlertDialog.Builder(getContext());
      builder.setTitle("Save QR Code");
      builder.setMessage("Please enter the name for the QR Code.");
      builder.setCancelable(true);
  
      // Set up the input
      final EditText input = new EditText(getContext());
      input.setInputType(InputType.TYPE_CLASS_TEXT );
      builder.setView(input);
  
      builder.setPositiveButton("OK", new DialogInterface.OnClickListener() {
          @Override
          public void onClick(DialogInterface dialog, int which) {
              // Here is the part
              m_Text = input.getText().toString().trim();
              if(TextUtils.isEmpty(m_Text)){
                  input.setError("Please Enter Name of the Image QR Code");
              }else {
                  //do smtg
              }
          }
      });
      builder.show();
  </code></pre>