简体   繁体   中英

How do I change the color of a text menu item with ActionBarCompat?

I have the title color set correctly, but I'm not sure what I need to style to change the menu "icon" text color in the ActionBarCompat. I want the "Login/Join" text to be white.

Sorry, I'm sure the solution is out there on StackOverflow, but I haven't been able to string together the right keywords to find it :)

在此处输入图片说明

I couldn't figure out how to change that value programmatically or via xml aside from altering the base parent theme. I ended up changing my theme to inherit from Theme.AppCompat and set the titleTextStyle ( https://stackoverflow.com/a/5881739/413254 ). I was inheriting from Theme.AppCompat.Light which naturally makes all text in the actionbar dark. Another option was to inherit from Theme.AppCompat.Light.DarkActionBar (which would have saved me a lot from multiple xml style headaches).

One of those situations where you get caught up in the details and miss the more fundamental things :P. Hope this helps somebody.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM