I wanna change my Apps Titlebar color and tried it in this way:
Part of the manifest file:
<application
android:icon="@drawable/icon"
android:label="@string/app_name"
android:theme="@style/Theme.MyTitleBar" ></application>
The style block part of the file styles.xml:
<style name="Theme.MyTitleBar" parent="android:Theme">
<item name="android:colorBackground">#FFFFFF</item>
<item name="android:background">#FFFFFF</item>
<item name="android:textColor">@android:color/black</item>
<item name="android:textStyle">bold</item>
<item name="android:textSize">16sp</item>
</style>
But only the text color and attributes changes correct. Any guest what I did wrong?
Add This style.xml File in your project according to your requirment...
EDIT: I added the part for the ActionBar (sorry I put only for Dialogs at first)
You can follow this, it will allow you to change moreover other attributes that just the title bar:
Just call your custom theme in the manifest file:
Then create these 2 styles in your
styles.xml
. The first one defines the theme, the second one, one of the styles to apply on the theme:NOTE: In this example, I customize the theme Holo Light as you can see with this:
android:style/Widget.Holo.Light.ActionBar
.