Assuming that I lost a reference to a dialog, how do I check for open dialogs? How can I close all open dialogs at once without knowing what dialog it is?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In those cases it is recommended that you open your dialogs using the method
showDialog(int). That way, even if you do not have a reference to the dialogs you can usedismissDialog(int)to close them. Make sure to surround thedismissDialogcall with atry-catchif you are not sure whether or not the dialog is open.