Reputation: 235
I am fallowing a tutorial and have an error on color
saying "color can not be resolved or is not a field". Anyone know the reason for this. Thanks.
lv.setBackgroundColor(callerActivity.getResources().getColor(R.color.Twitter_blue));
Upvotes: 0
Views: 801
Reputation: 2325
You need to open "colors.xml" file under the "values" folder and add the color:
<color name="Twitter_blue">#FF4081</color>
with the relevant colour hex number.
Upvotes: 2
Reputation: 3355
Twitter_blue
apparently is not a field in R.color
have you tried just using R.color.blue
or something similar?
Upvotes: 1