如何删除应用的标题栏?

时间:2015-04-16 00:49:33

标签: android android-titlebar

我想删除应用程序的标题栏,即使用应用程序名称的黑色标签栏。

已按照示例进行操作,但始终提供错误初始化:
例1

 <application 
        android:icon="@drawable/icon" 
        android:label="@string/app_name" 
        android:theme="@android:style/Theme.NoTitleBar.Fullscreen">

示例2

android:theme="@android:style/Theme.DeviceDefault.NoActionBar.Fullscreen"

我的XML

  <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >

1 个答案:

答案 0 :(得分:1)

这对我有用:

在style.xml中:

<style name="AppTheme" parent="android:Theme.NoTitleBar">
</style>
AndroidManifest.xml中的

<application
    android:theme="@style/AppTheme" 
    ...>
相关问题