// 初始化警告弹出框 alertDialog = new EmpAlertView(context, Utils.getIdByName(context, "style", "alert_style")); alertDialog.setCanceledOnTouchOutside(false); LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); layout = inflater.inflate(Utils.getIdByName(context, "layout", "alertview"), null); layout.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT)); // 设置半透明背景 Window window = alertDialog.getWindow(); WindowManager.LayoutParams lp = window.getAttributes(); lp.alpha = 0.9f; window.setAttributes(lp); alertDialog.setContentView(layout);
// 初始化警告弹出框 alertDialog = new EmpAlertView(context, Utils.getIdByName(context, "style", "alert_style")); alertDialog.setCanceledOnTouchOutside(false); LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); layout = inflater.inflate(Utils.getIdByName(context, "layout", "alertview"), null); layout.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT)); Window window = alertDialog.getWindow(); WindowManager.LayoutParams lp = window.getAttributes(); lp.alpha = 0.9f; window.setAttributes(lp); // 防止按下再重新开启屏幕电源,原先变暗的背景变白色 window.addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED); alertDialog.setContentView(layout);
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有