Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

setCardBackgroundColor() set wrong color

I am programmatically trying to set the color of a CardView using the function setCardBackgroundColor() but the color is showing up incorrectly.

  • If I set the color to black(#000000) it shows up as medium gray.
  • If I set the color to white(#ffffff) or green(#9ccb3f) it shows up as violet
like image 714
toidiu Avatar asked Nov 12 '15 20:11

toidiu


1 Answers

Make sure you are not sending in the id of the color (i.e. R.color.COLOR_NAME)

like image 181
wdziemia Avatar answered Nov 03 '22 23:11

wdziemia