Implement Check on Custom dialog android
<p>I want to implement check on Custom Dialogue Box on android means i have "OK" and "Cancel" button on Custom Dialog Box now i have 3 edit text on custom Dialogue and when i click on OK the Dialog Box disapper automatically without check in for edit text</p>

<p>code is below:</p>

<pre><code>     void openCustomDialog(){
     AlertDialog.Builder customDialog
      = new AlertDialog.Builder(orderDetails.this);
     customDialog.setTitle("Custom Dialog");

     LayoutInflater layoutInflater
  = (LayoutInflater)getApplicationContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
  View view=layoutInflater.inflate(R.layout.mylayout,null);

   et1 = (EditText)view.findViewById(R.id.et1);
   et2 = (EditText)view.findViewById(R.id.et2);
   et3 = (EditText)view.findViewById(R.id.et3);


  customDialog.setPositiveButton("OK", new DialogInterface.OnClickListener(){

   @Override
   public void onClick(DialogInterface arg0, int arg1) {
    // TODO Auto-generated method stub
System.out.println("######################3buton======="+et1.getText());     
System.out.println("@@@@@@@@@##############3buton======="+et2.getText());     

System.out.println("$$$$######3buton======="+et3.getText());    

if(et1.getText().equals("")){



}
else{



}

   }});

  customDialog.setNegativeButton("Cancel", new DialogInterface.OnClickListener(){

   @Override
   public void onClick(DialogInterface arg0, int arg1) {
    // TODO Auto-generated method stub

   }});

        customDialog.setView(view);
        customDialog.show();
    }
</code></pre>
