gpt4 book ai didi

java - 移除标题栏使整个应用程序背景看起来是黑色的

转载 作者:行者123 更新时间:2023-11-29 07:53:15 24 4
gpt4 key购买 nike

我需要从我的整个应用程序中删除 ActionBar,因此我将 Theme.NoTitleBar 添加到 list 中的代码中。

以下是我的 list

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.beleeta.bileetacrm"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk
android:minSdkVersion="11"
android:targetSdkVersion="17" />

<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@android:style/Theme.NoTitleBar" >
<activity
android:name="com.beleeta.bileetacrm.Home"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>

</manifest>

但是,这会使整个应用程序背景看起来是黑色的!在我进行此更改之前,应用程序是白色的,下面是代码

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.beleeta.bileetacrm"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk
android:minSdkVersion="11"
android:targetSdkVersion="17" />

<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.beleeta.bileetacrm.Home"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>

</manifest>

为什么会这样?我怎样才能摆脱这个?这是我第一次处理这些操作栏。

我的最小 SDK 是 11。

最佳答案

默认的 Theme(因此,Theme.NoTitleBar)是暗色主题 - 您可以使用 Theme.Light.NoTitleBar 来获得亮色(即背景)主题。

关于java - 移除标题栏使整个应用程序背景看起来是黑色的,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19699017/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com