在横向模式下隐藏状态栏,旋转时保留空白 [英] hide status bar in landscape mode leave a blank space when rotating

查看:87
本文介绍了在横向模式下隐藏状态栏,旋转时保留空白的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

问题在于隐藏状态栏并旋转屏幕时,它会在状态栏位置留下白色的速度,直到屏幕完全旋转,如下面的屏幕截图所示.

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

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

那么,有没有人有解决此问题的解决方案,请帮助我,非常感谢!

解决方案

您应该将视图的尺寸设置为320 *480.因为您可能隐藏了状态栏,但是视图的尺寸将为320 * 460(默认值)

看看这个.

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!

解决方案

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.

这篇关于在横向模式下隐藏状态栏,旋转时保留空白的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆