Lollipop release theme

I am using sherlock action bar in my project, I used Theme.Sherlock.Light.DarkActionBar

   <style name="AppTheme" parent="Theme.Sherlock.Light.DarkActionBar">
    <item name="android:homeAsUpIndicator">@drawable/transparent</item>
    <item name="homeAsUpIndicator">@drawable/transparent</item>
    <item name="actionBarStyle">@style/Widget.MyTheme.ActionBar</item>
    <item name="android:actionBarStyle">@style/Widget.MyTheme.ActionBar</item>
    <item name="android:titleTextStyle">@style/Widget.MyTheme.TitleTextStyle</item>
    <item name="android:textAllCaps">false</item>   
    </style>

      

Problem: I am getting a light color menu with lollipop:

pre lollipop image:

enter image description here

Lollipop image:

enter image description here

Can anyone please visit me how can I get a more subtle menu color on both.

+3


source to share


3 answers


You can create a style that extends from actionbar

sherlock to change your color actionbar

with other properties.

<style name="Theme.MyTheme" parent="Theme.Sherlock.ForceOverflow">
    <item name="actionBarStyle">@style/Widget.MyTheme.ActionBar</item>
    <item name="android:actionBarStyle">@style/Widget.MyTheme.ActionBar</item>
</style>

<style name="Widget.MyTheme.ActionBar" parent="Widget.Sherlock.ActionBar">
    <item name="android:background">#ff000000</item>
    <item name="background">#ff000000</item>
    <item name="android:textColor">#CC3232</item>
</style>

      

Only for TextColor



<style name="YOURTHEME.ActionBar.TitleTextStyle" parent="TextAppearance.Sherlock.Widget.ActionBar.Title">
        <item name="android:textColor">@color/yourColor</item>
        <item name="textColor">@color/yourColor</item>
</style>

      

Last option Solution

<item name="android:textColorPrimary">@color/yourColor</item>

      

+2


source


You should create a new styles.xml file in a separate values-21 folder. There you can define a specific theme / style that suits your needs for Lollipop devices only.



0


source


You should use the ActionBar

or ToolBar

provided by the library app-compat

instead ActionBarSherlock

.

ABS uses replacement Holo themes for older versions which I think haven't been updated in a while.

0


source







All Articles