Android 调节屏幕亮度代码,android亮度,public void
分享于 点击 3456 次 点评:95
Android 调节屏幕亮度代码,android亮度,public void
public void setBrightness(int level) { ContentResolver cr = getContentResolver(); Settings.System.putInt(cr, "screen_brightness", level); Window window = getWindow(); LayoutParams attributes = window.getAttributes(); float flevel = level; attributes.screenBrightness = flevel / 255; getWindow().setAttributes(attributes); }
用户点评