横向隐藏状态栏 旋转时留白

发布于 2024-09-20 00:31:31 字数 345 浏览 3 评论 0原文

我的应用程序支持以横向模式显示某些屏幕,并且在横向模式下,我设置隐藏状态栏以获取模式空间来显示数据。

问题是在隐藏状态栏和旋转屏幕时,它会在状态栏位置留下白色的空间,直到屏幕完全旋转,如下图所示。

替代文字 我猜旋转屏幕时的操作步骤是: 1.隐藏状态栏 2.旋转屏幕 3.调整屏幕大小以取代状态栏。

因此,在屏幕完全旋转之前,用户仍然可以看到空白区域,这不好,我想做一些事情,例如:将空白区域的颜色设置为黑色,或者设置动画来隐藏该空白区域,但不幸的是!

所以,有没有人有办法解决这个问题,请帮助我,非常感谢!

My application support to display some screen in landscape mode, and in landscape mode, I set to hide the status bar to get mode space to display data.

The problem is while hiding the status bar and rotate screen, it leave a white pace at status bar position until the screen is rotated completely as below screenshot.

alt text
I guess that steps of operations when rotating screen are:
1. hide status bar
2. rotate screen
3. resize screen to take place of status bar.

So until the screen is rotated completely, user still can see the white space, it is not good and I want to do something such as: set color for that blank space to black, or set animation to hide that blank space but unlucky!

So, does anyone have solution to resolve this, please help me, thanks a lot!

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

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

发布评论

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

评论(1

草莓酥 2024-09-27 00:31:31

你应该将视图的大小设为 320 * 480。因为你可能隐藏了状态栏,但视图的大小将为 320 * 460(默认),

看看这个。

you should make the size of view 320 * 480. as you might have hidden the statusbar but the size of view will be 320 * 460(default)

Check out this one.

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