To change the default text color of your app so that the text color in your app is the same everywhere, do the following:
- Go to /res/values/colors.xml
- Add the color to the colors.xml if not available as shown below
- Go to /res/values/styles.xml
- Add the android:textColorTertiary item style to the theme as shown below. Optionally you can add the textColorPrimary and textColorTertiary as well:
colors.xml
<?xml version="1.0" encoding="utf-8"?> <resources> ... <color name="text_color_primary">#111111</color> <color name="text_color_secondary">#222222</color> <color name="text_color_tertiary">#333333</color> ... </resources>
styles.xml
<resources> <!-- Base application theme. --> <style name="AppTheme" parent="Theme.AppCompat.Light"> ... <item name="android:textColorPrimary">@color/text_color_primary</item> <item name="android:textColorSecondary">@color/text_color_secondary</item> <item name="android:textColorTertiary">@color/text_color_tertiary</item> ... </style>