1

I am trying to set the text colour for all the text inside a ActionMode in android. I have found ways to change TitleTextColor and SubTitleTextColor but I cannot find a way to style the actual non-collapsed menu item text color.

I am using the android.support.v7.widget.toolbar using the statSupportActionMode(ActionMode.Callback) to display the action mode.

Thanks in advance,

Thomas.

thunter1000
  • 29
  • 1
  • 3

2 Answers2

0
<style name="ThemeName" parent="@style/Theme.Sherlock.Light">
    <item name="actionMenuTextColor">@color/white</item>
    <item name="android:actionMenuTextColor">@color/white</item>
</style>
Mehran Zamani
  • 831
  • 9
  • 31
  • Hi thanks for your help, I have tried this but this also changes the colour of the menu items in the toolbar... Ideally I would want white text for the toolbar and black text for the actionMode. Is there a way to just single out the actionMode? – thunter1000 Feb 08 '17 at 09:22
  • actionbar and toolbar are in the same place. what do you mean!? – Mehran Zamani Feb 08 '17 at 09:40
  • 1
    I'm trying to style the colour of the menu items in the ActionMode only, which appears when items are selected in the application (using `Activity.startSupportActionMode(ActionMode.Callback)`). `actionMenuTextColor` changes the colour for both the ActionBar/Toolbar and the ActionMode. – thunter1000 Feb 08 '17 at 10:48
0

I used the iconTint attribute to style the menu items. Grab the xml file you use to inflate the menu then add the following attribute for each menu items that you want to style.

android:iconTint="#fff"

The above line of code will render the icons white. It's better to use your theme's color in styling.

nadinnnnnne
  • 509
  • 4
  • 4