Phil Wright Phil Wright - 5 months ago 23
Android Question

Crash when inflating a layout that sets the TextView.TextColor

I cannot inflate a layout if that layout sets the textColor of a TextView to the following...


I believe that the value is definitely defined for the application because I have a drawable that also references this resource and it works just fine. But if I try and use the accent color instead then it will work fine, e.g.


What is different about the textColor value?

Answer Source

I would have to assume you are looking for the primary text color of your theme, thus you would use:


There are a dozen or so textColorXXXX attributes, so you would need to review them to see which one you are actually trying to use.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download