我想从我的应用程序中删除标题栏,但是当我使用Theme.Light.NoTitleBar时,它在样式xml文件中显示错误这是我的样式xml文件
<!--
Base application theme, dependent on API level. This theme is replaced
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
-->
<style name="AppBaseTheme" parent="Theme.AppCompat.Light">
<!--
Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to
backward-compatibility can go here.
-->
</style>
<!-- Application theme. -->
<style name="AppTheme" parent="AppBaseTheme">
<!-- All customizations that are NOT specific to a particular API-level can go here. -->
</style>
</resources>这是我的清单文件
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" > 发布于 2014-11-19 12:29:30
首先,它使用所有活动
requestWindowFeature(Window.FEATURE_NO_TITLE);在标签栏正下方的工具栏上,有一排图标。单击看起来像星形的图标,然后转到All -> Theme.NoTitleBar(.Fullscreen)

发布于 2014-11-19 12:29:41
试试这个:
<style name="AppBaseTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:windowNoTitle">true</item>
</style>发布于 2014-11-19 12:53:49
尝尝这个
this.requestWindowFeature(Window.FEATURE_NO_TITLE); // Remove title bar
setContentView(R.layout.activity_home);注意:移除标题栏、通知栏等功能必须在setContentView(Layout_id)之前调用;
https://stackoverflow.com/questions/27008919
复制相似问题