嗨,任何人都知道如何隐藏默认主页,返回时间显示系统栏由 android?
问问题
223 次
2 回答
1
I suggest you want to make it fullscreen, therefore you can use this:
You can hide the default system bar by using the following code for an activity in the AndroidManifest.xml file:
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
Here an example of a splash screen:
<activity
android:name=".SplashScreen"
android:label="@string/app_name"
android:noHistory="true"
android:screenOrientation="landscape"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
You should put it in every activity that must be fullscreen.
Using this line of code in the <application>
tag is not going to work.
于 2013-03-07T10:04:34.423 回答
0
在 Android 4.0 及更高版本上,您可以使用SYSTEM_UI_FLAG_HIDE_NAVIGATION
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);
但是,您似乎在谈论 Android 3.0,因为它通常会在导航旁边显示电池电量等。无法使用 Android SDK 隐藏此栏,但有一些替代方法,如本问题所述。
于 2013-03-07T09:21:00.423 回答