如何使应用程序与Android中已有透明背景的状态栏重叠

发布于 2024-11-28 03:55:40 字数 113 浏览 3 评论 0原文

我现在正在通过一些框架文件自定义主题。问题是我把状态栏做成了透明背景。但状态栏和应用程序之间有一条明显的边线。我怎样才能将它们合并在一起?看起来应用程序与屏幕顶部对齐,但状态栏也存在。

提前致谢。

I'm now customizing theme through some framework files. The problem is that I've made the status bar with transparent background. But there's an obvious side line between status bar and the application. How can I merge them together? Looks like the application align to the top of the screen but the status bar also exist.

Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

澉约 2024-12-05 03:55:40

请在 StatusBarService.java 中找到 WindowManager.LayoutParams.TYPE_STATUS_BAR 并将其替换为 WindowManager.LayoutParams.TYPE_SYSTEM_OVERLAY

我想这就是你想要的。

Please find WindowManager.LayoutParams.TYPE_STATUS_BAR in StatusBarService.java and replace it with WindowManager.LayoutParams.TYPE_SYSTEM_OVERLAY.

I think it is what you want.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文