I'm not a "GUI guru", but I'll try to answer :)

Dialogs are managed by Activity class inside the Android framework.

If a dialog is shown with showDialog(id, [bundle]), it's remembered by Activity as being visble, and will be saved by Activity at the same time as your onSaveInstanceState / onRestoreInstanceState are called (if you have those overrides).

This means that managed dialogs survive orientation changes, as well as the activity being destroyed and re-created when the user comes back to it (such as with the list of recent applications, called up by [Home] long press).

http://developer.android.com/guide/topics/ui/dialogs.html

AFAIK, there is no way to check whether a a given dialog is on the screen, although the framework certainly knows this.

-- Kostya

01.02.2011 16:31, Jian Chen пишет:
A problem confused me for a little while, which is about dialog window and activity。

In a normal activity,an alert dialog is called to be shown on top of this activity,and HOME key is pressed to go to HOME screen。
Then HOME key is long pressed to go back to this activity。

Surprisingly, the alert dialog is restored.
Is this job done by activity manager?

A second question is, in some scenarios the activity does not hold the reference, is there a way to index its top window(for example, dialog window) from this activity's API?
--
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


--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com

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