http://developer.android.com/guide/topics/ui/dialogs.html#AlertDialog
On Apr 14, 5:28 am, sandhya <[email protected]> wrote: > Hi All, > > Can anyone let me know, how to create an Alert dialog in a dialog? is > it possible to create? > > My requirement is to show mulitple dialogs simultaneously. > > I tried creating with the following code snippet onClick of a Button > in the first Dialog and got an "BadToken" exception from > WindowManager: "Unable to add window -- token null is not for an > application" > > AlertDialog.Builder builder = new AlertDialog.Builder(getContext()); > builder.setTitle("Test Title"); > builder.setOnCancelListener(new Dialog.OnCancelListener() { > public void onCancel(DialogInterface dialog) { > dismiss(); > > } > }); > > AlertDialog dialog = builder.create(); > dialog.setOnShowListener(new DialogInterface.OnShowListener() { > > public void onShow(DialogInterface dialog) { > > } > }); > > builder.show(); > > Please help me to resolve the issue. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using "remove me" as the subject.

