title: Multiple fields in an alertDialog in android not working
body: <p>i want to add multiple fields in an alert dialog in android like name, phone no and address but it is showing only one field of address . I want to have multiple fields . I want user to add name, phone no and address in the dialog box but this code is not working.</p>
  
  <pre><code> private void showAlertDialog() {
          AlertDialog.Builder alertDialog = new AlertDialog.Builder(Cart.this);
          alertDialog.setTitle("One more step");
          alertDialog.setMessage("Enter your address: ");
  
  
  
  
          final EditText edtname = new EditText(Cart.this);
          final EditText edtphone= new EditText(Cart.this);
          final EditText edtAddress =new EditText(Cart.this);
          LinearLayout.LayoutParams lp =new LinearLayout.LayoutParams(
                  LinearLayout.LayoutParams.MATCH_PARENT,
                  LinearLayout.LayoutParams.MATCH_PARENT
  
          );
          edtphone.setLayoutParams(lp);
          edtname.setLayoutParams(lp);
          edtAddress.setLayoutParams(lp);
  
          alertDialog.setView(edtname);
          alertDialog.setView(edtphone);
          alertDialog.setView(edtAddress);// add edit text to alert dialog
          alertDialog.setIcon(R.drawable.ic_shopping_cart_black_24dp);
  
  
         alertDialog.setPositiveButton("YES", new DialogInterface.OnClickListener() {
             @Override
             public void onClick(DialogInterface dialogInterface, int i) {
  
                 Request request = new Request(
                        edtname.getText().toString(),
                         edtphone.getText().toString(),
                         edtAddress.getText().toString(),
                         txtTotalPrice.getText().toString(),
                         cart  );
                 //submit to firebase
                 requests.child(String.valueOf(System.currentTimeMillis()))
                         .setValue(request);
                 //delete cart
                 new Database(getBaseContext()).cleanCart();
                 Toast.makeText(Cart.this,"Thank you , order placed", Toast.LENGTH_SHORT).show();
                 finish();
             }
         });
          alertDialog.setNegativeButton("NO", new DialogInterface.OnClickListener() {
              @Override
              public void onClick(DialogInterface dialogInterface, int i) {
                  dialogInterface.dismiss();
              }
          });
  
          alertDialog.show();
  
      }
  </code></pre>