弹出一个窗口,让背后的窗口变暗一点
WindowManager.LayoutParams lp = getWindow().getAttributes();
//When FLAG_DIM_BEHIND is set, this is the amount of dimming to apply. Range is from 1.0 for completely opaque to 0.0 for no dim.
getWindow().setAttributes(lp);
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND, WindowManager.LayoutParams.FLAG_DIM_BEHIND);
本文介绍了一种使用WindowManager布局参数在Android应用中调整背后窗口背景亮度的方法,通过设置dimAmount属性来实现从完全不透明到完全透明的渐变效果,为用户提供了更好的视觉体验。

3726

被折叠的 条评论
为什么被折叠?



