Changing font color only shows up in design view, not app

I have successfully changed the font color of the Crime_Title so that it is black.
It shows up as expected in the design view as black (instead of grey).

However, when I run the app, the title still looks grey.

I’ve seen this kind of behavior in the past in other apps I’ve built and I’m wondering why this might be occurring.
I’m running on a API 25 (Nougat) emulator.
You can see the font color is referenced in the XML layout:
tools:text=“crime_title is here”
tools:textColor="@android:color/black" />


I just looked more closely at that line that sets the textColor – It has the tools: namespace prefix so it only sets it in the designer. I just made the change and added

That fixed it.

However, I’m not sure why changing the value using the Design view window set the tools: version instead of the android: one.

Wow. That is weird. Anything with the tools namespace is stripped out at compile time and only used by the preview. It is so strange that the tools would set tools:textColor.

Thanks for posting your solution.

1 Like