Skip to content Skip to sidebar Skip to footer

Android: Title Bar Color Don't Change

I wanna change my Apps Titlebar color and tried it in this way: Part of the manifest file: Copy

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:

<style name="AppTheme" parent="@android:style/Theme.Holo.Light">
    <item name="android:actionBarStyle">@style/ActionBarStyle</item>
</style>

<style name="ActionBarStyle" parent="android:style/Widget.Holo.Light.ActionBar">     
    <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>

NOTE: In this example, I customize the theme Holo Light as you can see with this: android:style/Widget.Holo.Light.ActionBar.


Solution 2:

Add This style.xml File in your project according to your requirment...

    <item name="android:actionBarStyle">@style/myActionBar</item>

</style>



<style name="myActionBar" parent="@android:style/Widget.Holo.Light.ActionBar.Solid.Inverse">    
    <item name="android:titleTextStyle">@style/myActionBar.titleTextStyle</item>
</style>

<style name="myActionBar.titleTextStyle" parent="@android:style/TextAppearance.Holo.Widget.ActionBar.Title.Inverse">
    <item name="android:textColor">@color/darkgrey</item>
</style>

 <style name="myActionBar" parent="@android:style/Widget.Holo.Light.ActionBar.Solid.Inverse">
    <item name="android:background">#e6ebc3</item>
</style>


Post a Comment for "Android: Title Bar Color Don't Change"