这张支票不管用
fun showDialog() {
if (supportFragmentManager.findFragmentByTag(FailureDialog.TAG) == null) {
FailureDialog().show(supportFragmentManager, FailureDialog.TAG)
}
}发布于 2020-07-03 07:24:34
对话框是异步添加到片段管理器中的,因此检查不起作用,在这种情况下,值得使用showNow()。
fun showDialog() {
if (supportFragmentManager.findFragmentByTag(FailureDialog.TAG) == null) {
FailureDialog().showNow(supportFragmentManager, FailureDialog.TAG)
}
}https://stackoverflow.com/questions/62710344
复制相似问题