SetCardBackgroundColor () set the wrong color

I am trying to programmatically set the color of a CardView using the setCardBackgroundColor () function, but the color does not display correctly.

  • If I set the color to black (# 000000), it displays as medium gray.
  • If I set white (#ffffff) or green (# 9ccb3f), it displays as purple
+5
source share
1 answer

Make sure you are not sending a color id (i.e. R.color.COLOR_NAME)

+7
source

Source: https://habr.com/ru/post/1235829/


All Articles