I'm trying to update my notepad app to use Material Design, even on older devices.
What i did so far:
android:theme="@style/Theme.NoteItTheme"
to <application ... ></application>
attributescreating the theme in /res/values/themes.xml:
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="Theme.NoteItTheme" parent="Theme.AppCompat.Light">
<!-- Here we setting appcompat’s actionBarStyle -->
<!-- <item name="actionBarStyle">@style/MyActionBarStyle</item> -->
<!-- ...and here we setting appcompat’s color theming attrs -->
<item name="colorPrimary">@color/primary</item>
<item name="colorPrimaryDark">@color/primary_dark</item>
<item name="android:textColorPrimary">@color/text</item>
<item name="colorAccent">@color/ui</item>
<!-- The rest of your attributes -->
</style>
The problem:
As you can better see here:
when i expand the actionbar's menu, text color and background color are very similar. I hadn't this problem before, how do i change just the items text color?
<item name="android:textColorPrimary">yourColor</item>
Above code changes the text color of the menu action items for API >= v21.
<item name="actionMenuTextColor">@android:color/holo_green_light</item>
Above is the code for API < v21
Some tutorials:
Changing toolbar's text color and overflow icon color
Appcompat v21 Pre-Lollipop devices
Below worked for me
<item name="actionMenuTextColor">yourColor</item>
<item name="android:actionMenuTextColor">yourColor</item>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With