Trying to configure a custom header/title layout with the newer Android Holo Theme can be painful, often producing cryptic error messages. According to google the issue is with the new actionbar added in the halo theme conflicting with the older title configuration.
Here is what worked for me: after creating a layout named “CustomHeader.xml” I added the following lines to my activity OnCreate method:
1 2 3 4 5 6 7
I then modified my androidmanifiest.xml and style.xml files to configure a custom theme that inherits from the oridinal halo theme but removes the action bar.
1 2 3
1 2 3 4 5 6
If you don’t already have a styles.xml file, it should be created in /resources/values/
If you try setting a custom header/title without removing the actionbar you will get the following runtime exception: “Cannot combine custom title with other title features”