How to display a display a dialog box on clicking the button of another dialog box?
<p>Am doing my android project. I have created the dialog box with YES and NO button. If i click YES a new dialog box should be displayed with options to select. I created the dialog box with options. But couldnt display it when i click YES in the dialog box which i created first. How can i do it? Please help. 
Thanks.</p>

<p>Here is the code of the dialog box which i created. When i click YES button in this dialog i should display another dialog</p>

<pre><code>AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setMessage("Low Memory\nYou want to send the file to server?")
               .setCancelable(false)
               .setPositiveButton("Yes", new DialogInterface.OnClickListener() {
                   public void onClick(DialogInterface dialog, int id) {

                   }
               })
               .setNegativeButton("No", new DialogInterface.OnClickListener() {
                   public void onClick(DialogInterface dialog, int id) {
                        dialog.cancel();
                        finish();
                   }
               });
AlertDialog alert = builder.create();
alert.show();
</code></pre>
