Can't use onDismiss() when using custom dialogs - Android

前端 未结 6 2294
抹茶落季
抹茶落季 2021-02-20 05:31

I\'m working on a little program, and I need to add a custom dialog that passes some info to the calling acitivity when it closes. I extended the dialog class, and when I try to

6条回答
  •  生来不讨喜
    2021-02-20 06:22

    One thing to remember is that an OnDismissListener is listening for the dismiss of the child processes. The parent of your customer dialog needs the onDismissListener, not the dialog itself.

    "Interface used to allow the creator of a dialog to run some code when the dialog is dismissed."

提交回复
热议问题