I’m trying to set the background color for a tablerow in android and am having trouble referencing the proper int. Below is the code. Am I doing something wrong? The color that turns up in the background is a light grey.
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Trackfolio</string>
<color name="colorWhite">#FFFFFF</color>
<color name="colorBlack">#000000</color>
<color name="colorLightBlue">#6495ED</color>
</resources>
row.setBackgroundColor(R.color.colorLightBlue);
Also is there a way to set the text color?
tv.setTextColor(R.color.colorBlack);
cfarm54,
The way you are accessing the colors you are getting the offset location in R.java gen file.
You need to access them like this…