Wednesday, 16 September 2015

How to change Action Bar color in Android


     

     <resources>

    <style name="MyTheme" parent="@android:style/Theme.Holo.Light.DarkActionBar">
        <item name="android:actionBarStyle">@style/MyActionBar</item>
        <item name="android:actionMenuTextColor">@color/textColor</item>
    </style>

    <style name="MyActionBar" parent="@android:style/Widget.Holo.Light.ActionBar">
        <item name="android:titleTextStyle">@style/TitleBarTextColor</item>
        <item name="android:background">@color/actionBar</item>
    </style>

    <style name="TitleBarTextColor"   parent="@style/TextAppearance.AppCompat.Widget.ActionBar.Title">
        <item name="android:actionBarSize">120dp</item>
        <item name="actionBarSize">120dp</item>
        <item name="android:textColor">@color/textColor</item>
    </style>

</resources>



And also mention the theme name in your Manifest file

   android:theme="@style/MyTheme" >


Happy Coding:)