Android--WindowManager,kotlin静态内部类

本文深入探讨了Android中的WindowManager服务,特别是如何使用它来管理窗口属性,如屏幕亮度、按钮亮度等。同时介绍了WindowManager.LayoutParams的重要成员变量和相关函数,包括copyFrom方法的作用。此外,提到了在Kotlin中使用静态内部类的实践。
摘要由CSDN通过智能技术生成

其中 screenBrightness 表示屏幕的b rightness ,而 buttonBrightness 表示一般按键和键盘按键的 brightness

float BRIGHTNESS_OVERRIDE_FULL Value for screenBrightness and buttonBrightness 
indicating that the screen or button backlight brightness should be set to the hightest value 
when this window is in front.
把brightness(screenBrightness/buttonBrightness)设置到最高值。
float BRIGHTNESS_OVERRIDE_NONE Default value for screenBrightness and buttonBrightness indicating that the brightness value is not overridden for this window and normal brightness policy should be used.
不对brightness(screenBrightness/buttonBrightness)重新进行设置,采用默认的普通值。
float BRIGHTNESS_OVERRIDE_OFF Value for screenBrightness and buttonBrightness indicating that the screen or button backlight brightness should be set to the lowest value when this window is in front.
把brightness(screenBrightness/buttonBrightness)设置到最低值。

changed系列

该系列主要用于  **int copyFrom (WindowManager.LayoutParams o)**函数中。

在函数中,首先将用参数中传入的 WindowManager.LayoutParams的信息复制到本 WindowManager.LayoutParams

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值