How to know if a dialog is dismissed in Android?

后端 未结 4 1666
面向向阳花
面向向阳花 2020-12-29 19:43

If the dialog is dismissed,I want to do something for my background.So I want to know if the dialog is dismissed

4条回答
  •  滥情空心
    2020-12-29 20:39

    I noticed that the onDismissListener is called even when you select one of the options in the alert (Yes/No/Neutral button). For me onCancelListener was the best option since I needed something that tracked an explicit closing of the dialog by clicking outside the alert area.

提交回复
热议问题