无法删除android中的标题栏

时间:2015-11-06 12:05:39

标签: android titlebar

我已经尝试了所有这三种方法,但仍然无法移除标题栏。

此方法删除了androidstudio(1.4)中的标题栏,但我仍然可以在模拟器中看到标题栏:

这两种方法会破坏应用:enter image description here

enter image description here

Styles.xml: enter image description here

编辑(如何修复):如果你从java文件中的活动而不是appcompat继承它将会有效。

4 个答案:

答案 0 :(得分:0)

<style name="AppBaseTheme" parent="android:Theme.Holo.Light.NoActionBar">
    <!-- API 11 theme customizations can go here. -->
</style>

在所有styles.xml文件中发布此行。

答案 1 :(得分:0)

styles.xml 更改为

<style name="AppTheme" parent="android:Theme.Holo.Light.NoActionBar">
    <!-- Customize your theme here. -->
    <item name="colorPrimary">@color/colorPrimary</item>
    <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
    <item name="colorAccent">@color/colorAccent</item>
</style>

并在清单中:

将您的活动主题更改为:

<activity
android:theme="@styles/AppTheme
....

答案 2 :(得分:0)

使用自定义主题;

<style name="CustomTheme" parent="Theme.Holo.Light.NoActionBar">
<!-- Customize your theme here. -->
</style>

并将其应用于您的清单

 <application
    android:theme="@styles/CustomTheme"

或直接用作:

 <application
    android:theme="Theme.Holo.Light.NoActionBar"

答案 3 :(得分:0)

尝试将其放在styles.xml中

var body = this.get('body');
if(body.match( \({P}|{F}/) {

}

并将主题应用于您的应用程序

相关问题