近日,遇到一个Dialog半透明背景消失的问题,背景需求是自定义Dialog实现警告提示框:
// 初始化警告弹出框
alertDialog = new EmpAlertView(context, Utils.getIdByName(context, style, alert_style));
alertDialog.setCanceledOnTouchOutside(false);
LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);