我想将我的应用程序设置为全屏视图。我的想法是使用FullScreen和NoTitlebar在单个活动中设置它,但我想在我的Manifest XML文件中为整个应用程序设置它,而不是为每个活动设置它。这个是可能的吗?
帮帮我..。谢谢。
发布于 2011-04-22 13:52:41
要将应用程序或任何单个活动设置为全屏显示,请插入以下代码
<application
android:icon="@drawable/icon"
android:label="@string/app_name"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen">在AndroidManifest.xml中,位于应用程序或活动选项卡下。
发布于 2013-06-20 22:42:22
另一种方法:将windowNoTitle和windowFullscreen属性直接添加到主题中(您可以在res/values/目录中找到styles.xml文件):
<!-- Application theme. -->
<style name="AppTheme" parent="AppBaseTheme">
<item name="android:windowNoTitle">true</item>
<item name="android:windowFullscreen">true</item>
</style>在清单文件中,在application中指定主题
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >发布于 2016-12-20 22:36:22
如果您的Manifest.xml具有默认的android:theme="@style/AppTheme"
转到res/values/styles.xml并更改
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">至
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">然后ActionBar就消失了!
https://stackoverflow.com/questions/5752619
复制相似问题