Note that there are some explanatory texts on larger screens.

plurals
  1. POCan i have alertDialogBox inside another alertDialogbox
    primarykey
    data
    text
    <p>Suppose in my application, i want the user to enter his roll no in a alertDialogbox that appears and then may be another alertDialogbox appears which will ask for his name... If both the enterd values are correct, he is allowed to do a specific task else not. How should i implement it? i tried creating two alertboxes one inside other (i mean, on the click of the ok button), but that did not worked,i got an error message.</p> <pre><code>final AlertDialog.Builder alert1 = new AlertDialog.Builder(this); final EditText input = new EditText(this); alert1.setTitle("Please Enter Roll No"); alert1.setView(input); alert1.setPositiveButton("Confirm", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { final AlertDialog.Builder alert2 = new AlertDialog.Builder(getBaseContext()); final EditText input1 = new EditText(getBaseContext()); alert2.setTitle("Please Enter Name"); alert2.setView(input1); alert2.setPositiveButton("Confirm", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { } }); alert2.setNegativeButton("Cancel", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { dialog.cancel(); } }); alert2.show(); } }); alert1.setNegativeButton("Cancel", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { dialog.cancel(); } }); alert1.show(); </code></pre> <p>How should i achieve it?? if there is some other way also, pl letme know...</p> <p>Thank u!! </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload