Question

I have been looking into this problem now and I can't find a solution, nor a recent response. This SO question from a year ago (How to style the text in action overflow menu) said that there was no way to handle the text color, but I hope that AppCompat has addressed this where Sherlock failed.

I have already tried changing the android:textColor for android:panelTextAppearance to no avail. As well as gone through the source looking for any style that might be addressing this with no luck. Do you know of any possible solution? or is this still not possible?

I'd like to just say who cares as hardware menus are supposed to be 6 feet under, but since Samsung keeps on using them I am forced to look into this. Thank you for any responses you have

Was it helpful?

Solution

Did you try this? stackoverflow.com/a/19008769/1139784 I would assume so since there was a similar answer on the question you linked.

@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
    inflater.inflate(R.menu.your_menu, menu);

    int positionOfMenuItem = 0; // or whatever...
    MenuItem item = menu.getItem(positionOfMenuItem);
    SpannableString s = new SpannableString("My red MenuItem");
    s.setSpan(new ForegroundColorSpan(Color.RED), 0, s.length(), 0);
    item.setTitle(s);
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top