pornName.setTextColor(R.color.period_red );which didn't display anything or it was incorrect color .
To use resource from xml files you need use getResources() method .So for color in this case will be:
pornName.setTextColor((getResources().getColor(R.color.period_red)));
where period_red you set in
/mySecretProject/res/values/colors.xml
<color name="red">#ff0000</color>I hope it helps.
No comments:
Post a Comment