tags:

views:

51

answers:

0

I'm trying to display an AlertDialog inside of another AlertDialog. When the user clicks on the any item within the initial AlertDialog another AlertDialog is created and shown.

I'm following the correct pattern for creating and displaying AlertDialogs, the problem is as soon as the code reaches the point where the innerDialog.show() method is encountered the application fails. The logcat prints an uncaught runtime exception:

android.view.WindowManager$BadTokenException : Unable to add window -- token null is not for an applicaion 

I'm wondering if i'm allowed to call the show() method on the innerAlertDialog manually. The outer AlertDialog is working because i'm using the callback onCreateDialog() method.