title: How to create custom alert dialog in android?
body: <p>I am developing a sample app.I am able to show alert on button click having some tittle and button .But now  I want to show a pop up window having  <strong>username (Label) and text field (Edit field)</strong> and a button.
  on click on button.can I make another popup xml file for that ?</p>
  
  <pre><code>public void selfDestruct(View view) {
           // Kabloey
           Log.d("Naveen", "Test====");
           System.out.println("----------------------ghfgjhf-----------------");
           AlertDialog alertDialog = new AlertDialog.Builder(SecondActivity.this).create();
           alertDialog.setTitle("Reset...");
           alertDialog.setMessage("R u sure?");
           alertDialog.setButton("OK", new DialogInterface.OnClickListener() {
                public void onClick(DialogInterface dialog, int which) {
  
                 //here you can add functions
  
              } });
           alertDialog.show();
       }
  </code></pre>
  
  <p>&nbsp;</p>
  
  <pre><code>   &lt;Button
       android:layout_height="wrap_content"
       android:layout_width="wrap_content"
       android:text="@string/self_destruct"
       android:onClick="selfDestruct" /&gt;
  </code></pre>