实现方案
/**
* 调整app级别屏幕亮度(不修改全局屏幕亮度)
*/
private fun setBrightness(brightnessValue: Int) {
val lp = window.attributes
lp.screenBrightness = brightnessValue / 255.0f
window.attributes = lp
}
/**
* 调整app级别屏幕亮度(不修改全局屏幕亮度)
*/
private fun setBrightness(brightnessValue: Int) {
val lp = window.attributes
lp.screenBrightness = brightnessValue / 255.0f
window.attributes = lp
}
本文标题:安卓改变App级别屏幕亮度
本文链接:https://www.haomeiwen.com/subject/lrouektx.html
网友评论