Q. How is dialog information saved within an activity?
A. Each activity keeps a pool of Dialog controls around for use and will reuse a Dialog control when asked to be shown again. Basically, a dialog is shown using the showDialog() method and added to the pool. Each dialog is dismissed but sticks around in the pool until either the activity is destroyed or the removeDialog() method is called explicitly.
Q. How can I determine which activity launched a Dialog control?
A. You can use the getOwnerActivity() method of the Dialog class to determine the parent activity of a specific Dialog control.
Was this article helpful?