title: How to add two edit text fields or views in an AlertDialog box?
body: <p>I want to add two edit text fields in an alert dialog box. As simple as the solution sounds I have not been able to gather a working one as of yet. I am not able to set the two (edit text) views simultaneously. </p>
  
  <p>Please comment in case you want to see any further code.</p>
  
  <pre><code>                alertDialog.setTitle("Values");
                  final EditText quantity = new EditText(SecondScan.this);
                  final EditText lot = new EditText(SecondScan.this);
  
                  quantity.setInputType(InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_FLAG_DECIMAL);
                  lot.setInputType(InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_FLAG_DECIMAL);
  
                  Project=arr[0].toString();
                  Item=arr[1].toString();
  
  
                  alertDialog.setMessage( "Employee No. : " + (Login.user).trim()+
                          "\nWarehouse      : " + (FirstScan.Warehouse).trim()+ 
                          "\nLocation           : " + (FirstScan.Location).trim()+ 
                          "\nProject              : " + Project.trim() + 
                          "\nItem                   : " + Item.trim() + 
                          "\nLot                      : " + Lot.trim()+  
                          "\n\nQuantity   :" );
                  alertDialog.setView(quantity);
                      alertDialog.setView(lot);
   // the bit of code that doesn't seem to be working.
  
  
                  alertDialog.setCancelable(false);
                  alertDialog.setPositiveButton("Update",  new DialogInterface.OnClickListener() { 
  
                      public void onClick(DialogInterface dialog, int id) {
                          //ACTION
                      }
                  });
  
                  AlertDialog alert = alertDialog.create();
                  alert.show();
  </code></pre>
  
  <p>I want the first edit text to occur after the <strong>lot</strong> and the second one after the <strong>quantity</strong> whereas only one of them seems to be working when I try pushing in both the views.</p>
  
  <p><strong>UPDATE</strong> : <em>As it turns out there is in fact no method of adding more than one view alone to an alert dialog box without having to create a layout for it.</em></p>