[android-developers] Dialog and Android lifecycle on ICS (Galaxy Nexus)

2011-12-09 Thread Royston
I have an odd but repeatable issue with Dialogs and Android lifecycle on a Nexus (emulated and actual device). I am using showDialog(ID) throughout and dismissDialog(ID) to remove. In the tests I run I show a dialog with and ID of 10 and dismiss it, I then show a dialog with an Id of 9 and

Re: [android-developers] Dialog and Android lifecycle on ICS (Galaxy Nexus)

2011-12-09 Thread Dianne Hackborn
I'd suggest using fragments and DialogFragment. On Fri, Dec 9, 2011 at 8:24 AM, Royston roystonpcar...@gmail.com wrote: I have an odd but repeatable issue with Dialogs and Android lifecycle on a Nexus (emulated and actual device). I am using showDialog(ID) throughout and dismissDialog(ID) to

Re: [android-developers] Dialog and Android lifecycle on ICS (Galaxy Nexus)

2011-12-09 Thread Royston
Dianne, Thank you for the response. Can I infer from you answer that the behaviour I have seen is as expected? I think I should have gone the DialogFragment route from project inception but probably not a good solution at this stage. I do note that if I consistently use removeDialog instead of

Re: [android-developers] Dialog and Android lifecycle on ICS (Galaxy Nexus)

2011-12-09 Thread Dianne Hackborn
Well... managed dialogs are saved and restored in a map, and so if you have multiple ones displayed the order they are re-created won't be guaranteed to be the same. If you only have one displayed at a time you should be fine (and I would recommend only having one displayed anyway since it