0
此代码使屏幕变暗,它适用于Android 2.2单位。但是当我在我的模拟器(2.3)和我的朋友的手机(2.3)上尝试它时,我去锁定屏幕。Android昏暗的屏幕下降问题
任何想法为什么,以及我应该如何让它与2.3一起工作?
WindowManager.LayoutParams lp = getWindow().getAttributes();
lp.screenBrightness = 0;
getWindow().setAttributes(lp);