all textColor * attributes point to a color selector . If you want to change the color for your theme, you need to follow these steps:
1) Create a color selector, create a file with the name (for example) primary_color.xml and put it in the res \ color folder
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_enabled="false" android:color="@android:color/bright_foreground_light_disabled"/> <item android:state_window_focused="false" android:color="@android:color/bright_foreground_light"/> <item android:state_pressed="true" android:color="@android:color/bright_foreground_light"/> <item android:state_selected="true" android:color="@android:color/bright_foreground_light"/> <item android:color="@android:color/bright_foreground_light"/>
2) In the styles.xml file, create a theme for your activity that references your newly created color selector:
<style name="ActivityStyle" parent="android:Theme"> <item name="android:textColorPrimary">@color/primary_color</item> </style>
3) In your AndroidManifest.xml, apply the new theme to any desired action:
<activity android:name=".activities.MedicationsActivity" android:theme="@style/ActivityStyle"> </activity>
source share