Reputation: 209
That's my style.xml and the error I'm getting after adding textColor item
Another weird things is that "textColor isn't available as u can see in the next image.
and it doesn't matter if I pick any of those hint i get the same error.
What could be wrong?
Upvotes: 1
Views: 43
Reputation: 29783
textColor
is an attribute provided in AppCompat library, where as android:textColor
is provided in Material theme.
Example:
Using Material theme and referring android:textColor
attribute:
<style name="AppTheme" parent="android:Theme.Material.Light">
<item name="android:textColor">@color/blue</item>
<item name="android:colorPrimary">@color/primary</item>
<item name="android:colorPrimaryDark">@color/primary_dark</item>
....
....
</style>
using AppCompat library with only textColor
attribute:
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="textColor">@color/blue</item>
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
...
...
</style>
this answer credit to @rohitarya: https://stackoverflow.com/a/36378905/4758255
Upvotes: 1