本例只能改App的Activity的亮度。原理就是修改视图的透明度。核心代码如下:
WindowManager.LayoutParams lp = getWindow().getAttributes();
lp.alpha = alpha;
getWindow().setAttributes(lp);
demo
微信扫一扫
本例只能改App的Activity的亮度。原理就是修改视图的透明度。核心代码如下:
WindowManager.LayoutParams lp = getWindow().getAttributes();
lp.alpha = alpha;
getWindow().setAttributes(lp);
demo
相关推荐