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 
dismiss it. I then show a dialog with an id of 7 and turn off the device 
(press F7). My Log shows:

onCreateDialog ID 7
onPrepareDialog ID 7
onCreateDialog ID 9
onPrepareDialog ID 9
onCreateDialog ID 10
onPrepareDialog ID 10

I.E all three dialogs are recreated but in dialog ID numerical order. If I 
unlock the device/emulator dialog with ID 7 is showing but obviously the 
code thinks the last dialpg shown is ID 10 so variables are pointing 
incorrectly and I get app failure. I understand that dialogs are cached if 
dismissed rather than removed but the sequence here is difficult to manage. 
Thoughts appreciated.

Roy


-- 
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

Reply via email to