views:

29

answers:

1

I'm managing dialogs by showDialog/dismissDialog/removeDialog.

I want to:

Display several dialogs in kind of a stack:

a) First dialog is shown using showDialog(DIALOG_TYPE)

b) Next dialogs are shown on top of the existing dialog

Now I'm only able to display first dialog using showDialog and then next dialogs are ignored.

Display last dialog:

a) First dialog is shown using showDialog(DIALOG_TYPE)

b) Application checks if dialog is displayed, closes dialog (if it's displayed) and opens a new dialog.

Is there any possibility to achieve one of the above solutions?

A: 

Dialog has an isShowing() method that should return if the dialog is currently visible. So you can use that to see if a dialog is showing and hide it with dismissDialog(). You just have to keep a reference to the Dialogs you create in onCreateDialog().

BrennaSoft
Ok, this satisfies the first scenario, but what about stacking? Maybe there is some possibility to show several dialogs of the same type?
pixel