android - Setting Overflow and popup colors in Toolbar -
i can't find reason why part of menu stays in light background color , light textcolor. tried lot of different things in styles xml nothing had effect on it.
someone can me?
<style name="mytheme" parent="theme.appcompat.light.darkactionbar"> <!-- customize theme here. --> <item name="colorprimary">@color/colorprimary</item> <item name="colorprimarydark">@color/colorprimarydark</item> <item name="coloraccent">@color/coloraccent</item> <item name="android:windowcontentoverlay">@null</item> <item name="actionbarstyle">@style/myactionbar</item> <item name="android:windowbackground">@color/backgroundcolor</item> <item name="android:textcolor">#ffffff</item> </style> <style name="myactionbar" parent="@style/widget.appcompat.actionbar.solid"> <item name="titletextstyle">@style/mytitletextstyle</item> </style> <style name="mytitletextstyle" parent="@style/textappearance.appcompat.widget.actionbar.title"> <item name="android:textcolor">@color/actionbartextcolor</item> </style>
in manifest file wrote under application:
android:theme="@style/mytheme"
add following color theme:
<item name="colorcontrolnormal">@color/colorprimarydark</item>
update
since not work, let me share how customized toolbar (note colors in example below created me... so, must change colors want.
toolbar in layout file
<android.support.v7.widget.toolbar ... style="@style/toolbartheme" app:popuptheme="@style/toolbarpopuptheme" app:titletextappearance="@style/toolbarthemetitletext" />
style.xml
<style name="toolbartheme" parent="theme.appcompat"> <!-- icon color --> <item name="colorcontrolnormal">@color/white_alpha_100</item> <!-- background color --> <item name="android:background">@color/default_action_bar_color</item> </style> <style name="toolbarthemetitletext" parent="textappearance.widget.appcompat.toolbar.title"> <item name="android:textsize">16sp</item> <item name="android:textstyle">bold</item> </style> <style name="toolbarpopuptheme"> <!-- text color pop menu --> <item name="android:textcolor">@color/black_alpha_100</item> </style>
Comments
Post a Comment