I’ve got an application that draws a custom title bar using the following style for the application theme:
<style name="App_Theme" parent="android:Theme">
<item name="android:windowTitleSize">30dip</item>
<item name="android:windowTitleBackgroundStyle">@style/App_TitleBackground</item>
</style>
This does not give me the holo theme. So I set the to parent=”@android:style/Theme.Holo”. This crashes the application with the following error:
E/AndroidRuntime(2048): Caused by: android.util.AndroidRuntimeException: You cannot combine custom titles with other title features
Is it disallowed to use custom title bar using:
requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
Or am I missing something here?
PS:
Mostly for the benefit of future visitors, one cannot use
Window.FEATURE_CUSTOM_TITLEwithHolothemes. Settingandroid:windowActionBaris not what I wanted, since I wanted a title bar, although a customized one.My workaround, was to
requestWindowFeature(Window.FEATURE_NO_TITLE)and add another layout that looked like a titlebar in my activity. That way, I get the best of both worlds.