WindowManager.LayoutParams lp = getWindow().getAttributes();
lp.alpha = 0.6f; //值越大越透明,即不暗getWindow().setAttributes(lp); getWindow().addFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);本文共 235 字,大约阅读时间需要 1 分钟。
WindowManager.LayoutParams lp = getWindow().getAttributes();
lp.alpha = 0.6f; //值越大越透明,即不暗getWindow().setAttributes(lp); getWindow().addFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);转载于:https://www.cnblogs.com/xuyj/p/9052966.html