Bwlow 代码正在增加整个屏幕的亮度,但我在 XML 中采用特定区域(例如采用 100*100 的线性布局),并且我只想增加该特定(线性布局)区域的亮度,而不是整个屏幕。
getWindow().setAttributes(l);
WindowManager.LayoutParams l = getWindow().getAttributes();
lll8.screenBrightness = 1.0f;
getWindow().setAttributes(l);