How can I solve a behavior that status bar lays over the full screen activity on ViewSonic gTablet?
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).
ht开发者_如何学编程tp://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,
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:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application>...your setting...</application>
<uses-sdk android:minSdkVersion="4"></uses-sdk> <!-- Add this element -->
</manifest>
Regards,
精彩评论