横向隐藏状态栏 旋转时留白
我的应用程序支持以横向模式显示某些屏幕,并且在横向模式下,我设置隐藏状态栏以获取模式空间来显示数据。
问题是在隐藏状态栏和旋转屏幕时,它会在状态栏位置留下白色的空间,直到屏幕完全旋转,如下图所示。
我猜旋转屏幕时的操作步骤是: 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.
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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你应该将视图的大小设为 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.