如何解决 ViewSonic gTablet 上状态栏覆盖全屏活动的问题?
我正在尝试在 ViewSonic gTablet(Android 2.2) 上开发全屏应用程序。 该应用程序在模拟器上完美运行,但状态栏位于实际硬件上的应用程序上方(请参阅下面 URL 中的图片)。
http://i54.tinypic.com/1iy1r7.jpg
我已经尝试了两种隐藏状态的方法酒吧但无法解决它。
1)通过AndroidManifest.xm隐藏状态栏
`<activity android:name=".HelloAndroid"
android:label="@string/app_name"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen">`
2)通过代码隐藏状态栏
`public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN); //For fullscreen
}`
有人可以帮助我吗? 感谢您的评论。
问候,
I'm trying to develop a full screen application on ViewSonic gTablet(Android 2.2).
The application works perfectly on the emulator, but the status bar lays over the application on the actual hardware(Refer the picture from URL below).
http://i54.tinypic.com/1iy1r7.jpg
I have tried both ways to hide status bar but could not solve it.
1) Hide the Status bar through AndroidManifest.xm
`<activity android:name=".HelloAndroid"
android:label="@string/app_name"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen">`
2) Hide the Status bar through code
`public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN); //For fullscreen
}`
Could anyone help me?
Your comment is appreciated.
Regards,
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我可以自己解决。原因是应用程序的分辨率设置。
如果您遇到同样的问题,您应该在 AndroidManifest.xml 中添加一个元素,如下所示:
问候,
I could solve it by myself. The reason was the application's resolution setting.
If you have a same issue, you should add an element into your AndroidManifest.xml as following:
Regards,