|
本帖最后由 zhouchao0118 于 2024-9-10 12:37 编辑
GITHUB里的软件写了1个StatusBarUtil.JAVA里面用到了WindowManager.LayoutParams
而WindowManager.LayoutParams的基础类是ViewGroup.LayoutParams
而ViewGroup.LayoutParams导入了[color=var(--devsite-code-color)]AttributeSet.JAVA
[color=var(--devsite-code-color)]所以这个GITHUB软件有没有用到自定义组件属性?
哪位大佬能帮我看一下,
它为什么要写这句话?
* 创建假的透明栏
*/
public static void setTranslucentView(ViewGroup container, int color, @FloatRange(from = 0.0, to = 1.0) float alpha) {
if (Build.VERSION.SDK_INT >= 19) {
int mixtureColor = mixtureColor(color, alpha);
View translucentView = container.findViewById(android.R.id.custom);
if (translucentView == null && mixtureColor != 0) {
translucentView = new View(container.getContext());
translucentView.setId(android.R.id.custom);
ViewGroup.LayoutParams lp = new ViewGroup.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT, getStatusBarHeight(container.getContext()));
===
GITHUB.com\baiyuliang\VoiceSpeekHighLight
|
|