2

How can I change the text colour of the visible menu actions of the Contextual Action Mode?

Changing the background, title colour and subtitle colour in the CAB-actionbar is easy:

1 - in my App theme:

<item name="actionModeStyle">@style/MyActionMode</item>

2 - then I defined the following styles:

<style name="MyActionMode" parent="@style/Widget.AppCompat.ActionMode">
    <item name="background">@color/my_primary_light</item>
    <item name="titleTextStyle">@style/MyActionModeTitleStyle</item>
    <item name="subtitleTextStyle">@style/MyActionModeSubtitleStyle</item>
</style>

<style name="MyActionModeTitleStyle" parent="@style/TextAppearance.AppCompat.Widget.ActionMode.Title">
    <item name="android:textColor">@color/my_accent</item>
</style>

<style name="MyActionModeSubtitleStyle" parent="@style/TextAppearance.AppCompat.Widget.ActionMode.Subtitle">
    <item name="android:textColor">@color/my_accent</item>
</style>

Can I change the text colour of only the context action bar menu items for action mode? I would prefer the leave the other (non-CAB) actionbar menu items untouched.

tm1701
  • 7,307
  • 17
  • 79
  • 168
  • 1
    Did you try: http://stackoverflow.com/questions/10338289/contextual-actionbar-styles – PseudoAj May 06 '16 at 13:52
  • That was my main source, but I could not found anything for the menu actions of the CAB. I think the action bar menu colours in general are used. My question: can I change the CAB (only) menu action text colours? – tm1701 May 06 '16 at 14:12

0 Answers0