kongzue / DialogX

💬 DialogX dialog box component library, easy to use, more customizable, more scalable, easy to achieve a variety of dialog boxes. DialogX对话框组件库,更加方便易用,可自定义程度更高,扩展性更强,轻松实现各种对话框、菜单和提示效果,更有Material You、iOS、MIUI等主题扩展可选
Apache License 2.0
2.05k stars 215 forks source link

【功能建议】有无方法可以监听到当前是否还存在有任意dialogx的实例? #437

Closed stars-one closed 5 months ago

stars-one commented 5 months ago

功能建议

需求描述:

目前有个需求,进入页面会弹出几个对话框(CustomDialog),需要在当前监听到没有对话框的情况下再进行某个操作,有无方法实现呢?

kongzue commented 5 months ago

对话框是否处于启动状态可以通过:

boolean showStatus = dialog.isShow();

来判断,具体请根据你的业务场景启动对话框,并持有对话框实例,在需要的时候进行判断:

CustomDialog dialog = CustomDialog.show(...);
//...
//判断
if (dialog.isShow()){
    ...
}