I know this topic was asked trillions of times throughout the web, but
there is no one place answering it.

in my application, I have a welcome screen. when I run the program end-
to-end everything is just fine - open/close activities and show
dialogs of all sorts.
but, when I reach the welcome screen and from there pressing the BACK
button - everything becomes messy:
1) the dialog i want to show cause BadTokenException (i'm using this
and not getApplicationContext() ).

2) I tried use try/catch to catch the exception - and it really passed
the showDialog line. but then, in the 2nd. run, when reaching a
showDialog expression, it throws IllegalStateException:
View.com.android.internal.policy.impl.PhoneWindow$DecorView@44a59830
has already been added to the window manager.

moreover, I understand that pressing HOME causes the onPause in the
activity, while BACK causes onDestroy, but what goes wrong ??

i'm trying to fix that issue for more than a week, but with no
success. any ideas ?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to