override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
val ctx = context ?: return super.onCreateDialog(savedInstanceState)
var builder: AlertDialog.Builder = AlertDialog.Builder(ctx, R.style.CenterDialogStyle)
builder.setView(view)
val dialog = builder.create()
dialog.setCanceledOnTouchOutside(false)
dialog.setCancelable(false) //无效
isCancelable = false //有效,设置这个才有效,上面的那个无效,坑死了,网上一堆无用的监听key事件,我去。。。
return dialog
}