I tried using setDescendantFocusability(FOCUS_AFTER_DESCENDANTS) on my ActivityGroup layout, and then I got a different error message:
ERROR/AndroidRuntime(871): android.view.WindowManager$BadTokenException: Unable to add window -- token android.app.localactivitymanager$localactivityrec...@4376ad40 is not valid; is your activity running? Any ideas? On Thu, May 28, 2009 at 10:07 AM, Taísa Cristina <[email protected]>wrote: > When I need to show dialog windows I use my parent context. That was the > only way I could show them with no BadTokenException. > > But when showing a search window I don't use any context as parameter. > > It seems that my embedded activity does not have the "window token", but > its parent. However a TabActivity is an ActivityGroup and we can show dialog > windows without problems. > > Does anybody know how the TabActivity "gives the token" to the embedded > activity (if it's really what happens)? > I could just see a focus request, what I also do in my implementation. > > > On Thu, May 28, 2009 at 3:25 AM, Android Users <[email protected]>wrote: > >> You have to be careful with the context in which you are using an activity >> group. I encountered this problem when i was trying to show a dialog in an >> activity but with different context. >> So if you are using any context as parameter, just verify it. >> >> >> >> > > > -- > Taísa Cristina Costa dos Santos > Computer Engineer > Brazil, SP > -- Taísa Cristina Costa dos Santos Computer Engineer Brazil, SP --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

