How do I use two themes?
I want to use a custom theme and I want to use the Holo.Light theme. But I always get the error:
Caused by: android.util.AndroidRuntimeException:
You cannot combine custom titles with other title features
I am currently trying to do this:
styles.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>
He has problems with:
parent="android:style/Theme.Holo.Light"
in styles.xml because if I change it to:
parent="android:style/Theme"
then it works ...
Any advice?
+3
source to share
1 answer
Not sure where the problem was, but this solved:
<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>
0
source to share