更新时间:2023-02-24 15:56:03
我想我可能已经解决了这个问题:如果我因为某种原因创建AlertDialog有:
I think I might have solved the issue: If I for some reason create the AlertDialog with:
return new AlertDialog.Builder(context)
.setIcon(R.drawable.myDialogIcon)
.setTitle(R.string.myDialogTitle)
.setView(view)
.setPositiveButton(R.string.myDialogDone, listener)
.show();
即。与 .show();
,而不是 .create(的);
问题不再是present。我不知道为什么这个工程还是什么不同于 AlertDialog.Builder ::显示()
功能 AlertDialog.Builder ::创建() ;
函数(超过明显的区别体现在相应的功能名称)
I.e. with .show();
instead of .create();
The issue is no longer present. I don't know why this works or what differs the AlertDialog.Builder::show()
function from the AlertDialog.Builder::create();
function (more than the obvious difference reflected in respective function names).