请增加状态栏高度获取函数
这是我目前模拟使用的,看看能不行添加进去,方便使用
// 状态栏高度获取函数 function getStatusBarHeight() { let result = 0; let resId = context.getResources().getIdentifier("status_bar_height", "dimen", "android"); if (resId > 0) { result = context.getResources().getDimensionPixelOffset(resId); } if (result <= 0) { result = context.getResources().getDimensionPixelOffset(R.dimen.dimen_25dp); } return result; }
6.6.2 将加入上述获取状态栏高度的方法, 可通过 ui 模块访问.
console.log(ui.statusBarHeight); // e.g. 63
好的,辛苦了😁
---原始邮件--- 发件人: @.> 发送时间: 2025年4月16日(周三) 下午3:44 收件人: @.>; 抄送: "ming @.@.>; 主题: Re: [SuperMonster003/AutoJs6] 请增加状态栏高度获取函数 (Issue #357)
6.6.2 将加入上述获取状态栏高度的方法, 可通过 ui 模块访问. console.log(ui.statusBarHeight); // e.g. 63
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***> SuperMonster003 left a comment (SuperMonster003/AutoJs6#357)
6.6.2 将加入上述获取状态栏高度的方法, 可通过 ui 模块访问. console.log(ui.statusBarHeight); // e.g. 63
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>