title: How disable button alertdialog if edittext is empty?
body: <p>I have alertdialog input text and i want if edittext is empty get toast " plz fill field " if user click positive button and if edittext is not empty continue open activity </p>
  
  <pre><code>LayoutInflater layoutInflaterAndroid = LayoutInflater.from(newapp.this);
  View view = layoutInflaterAndroid.inflate(R.layout.input_dialog, null);
  AlertDialog.Builder adb = new AlertDialog.Builder(newapp.this);
  
  adb.setView(view);
  name = (EditText) view.findViewById(R.id.name);
  password = (EditText) view.findViewById(R.id.password);
  adb
          .setCancelable(false)
          .setTitle(getResources().getString(R.string.info))
          .setIcon(R.mipmap.ic_launcher)
          .setPositiveButton(getResources().getString(R.string.start), new DialogInterface.OnClickListener() {
              public void onClick(DialogInterface dialogBox, int id) {
                   Intent cc = new Intent(StartActivity.this, news.class);
      startActivity(cc);
  
              }
          })
  
          .setNegativeButton(getResources().getString(R.string.close),
                  new DialogInterface.OnClickListener() {
                      public void onClick(DialogInterface dialogBox, int id) {
                          dialogBox.cancel();
                      }
                  });
  
  AlertDialog alertDialogAndroid = adb.create();
  alertDialogAndroid.show();
  
  }
  </code></pre>