Android Toolbar menu text color -
i'm trying change toolbar's menu item text color here, doesn't work. here's style:
<style name="apptheme" parent="theme.appcompat.light.noactionbar"> <item name="colorprimary">@color/colorprimary</item> <item name="colorprimarydark">@color/colorprimarydark</item> <item name="coloraccent">@color/coloraccent</item> <item name="toolbarstyle">@style/apptheme.toolbarstyle</item> <item name="buttonstyle">@style/apptheme.buttonstyle</item> <item name="colorcontrolhighlight">@color/colorprimary</item> </style> <style name="apptheme.toolbarstyle" parent="base.theme.appcompat.light.darkactionbar"> <item name="android:background">@color/colorprimary</item> <item name="titletextcolor">@android:color/white</item> <item name="titletextappearance">@style/textappearance.appcompat.widget.actionbar.title </item> <item name="actionmenutextcolor">@android:color/white</item> </style>
layout xml:
<android.support.v7.widget.toolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?attr/actionbarsize" app:title="@string/app_name" app:titlemarginstart="@dimen/margin_l" />
i have tried set toolbar theme directly in xml, menu item still back. there solution this?
add these lines in apptheme
style
<item name="actionmenutextcolor">@color/white</item> <item name="android:actionmenutextcolor">@color/white</item>
Comments
Post a Comment