AutoJs6 icon indicating copy to clipboard operation
AutoJs6 copied to clipboard

请增加状态栏高度获取函数

Open qq1060794917 opened this issue 8 months ago • 2 comments

这是我目前模拟使用的,看看能不行添加进去,方便使用

// 状态栏高度获取函数 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; }

qq1060794917 avatar Apr 15 '25 06:04 qq1060794917

6.6.2 将加入上述获取状态栏高度的方法, 可通过 ui 模块访问.

console.log(ui.statusBarHeight); // e.g. 63

SuperMonster003 avatar Apr 16 '25 07:04 SuperMonster003

好的,辛苦了😁

---原始邮件--- 发件人: @.> 发送时间: 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: @.***>

qq1060794917 avatar Apr 16 '25 09:04 qq1060794917