我想用一个自定义的主题,我想用全息。光的主题。但我总是犯错误:

Caused by: android.util.AndroidRuntimeException:
           You cannot combine custom titles with other title features

目前我正在尝试:
XML语言
<resources>
<style name="AppTheme" parent="android:style/Theme.Holo.Light">
    <item name="android:windowTitleSize">55dip</item>
    <item name="android:windowTitleBackgroundStyle">#FFFFFF</item>
</style>
</resources>

androidmanifest.xml文件:
    <application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:theme="@style/AppTheme">

    <activity
        android:name=".Main"
        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>

它有以下问题:
parent="android:style/Theme.Holo.Light"

在styles.xml中,因为如果将其更改为:
parent="android:style/Theme"

然后它工作…
有什么建议吗?

最佳答案

不知道问题出在哪里,但this解决了:

<resources>
<style name="AppTheme" parent="@android:style/Theme.Holo.Light">
    <item name="android:windowActionBar">false</item>
    <item name="android:windowTitleBackgroundStyle">@android:color/transparent</item>
    <item name="android:windowTitleSize">55dip</item>
    <item name="android:windowTitleStyle">#FFFFFF</item>
</style>
</resources>

09-11 06:07
查看更多