I have an application that has two custom Dialog extensions. My activity has an instance of each dialog as a private member variable. My activity also implements DialogInterface.OnDismissListener and I set it as the dismiss listener for each dialog.
My question is, what's the best way to determine which dialog was dismissed in my activity's onDismiss(DialogInterface d) method? I don't see anything in DialogInterface that lets me identify the dialog. For the moment, I'm testing if the dialog interface equals either of my dialog instances held by the activity, e.g. if (d == mOptionsDlg). That works but it feels brittle to me. Anyone know a better way? Or should I just stick with the instance comparison? Thanks -- 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