1

I am trying to set the background colour for MaterialCardView when it is selected. The background colour seems to affect the shadow area as well. This is not so noticeable when the color is solid, it becomes clear when the background color is partly translucent.

I found this question(Card View background color affects shadow color) where the author is ok with a solid color as background but I am not.

Is there a way to apply the background color only inside the card and not affect the shadow region?

Piyush Maheswari
  • 635
  • 3
  • 18
yeshu
  • 192
  • 1
  • 10

1 Answers1

1

Use background tint in XML

android:backgroundTint

Tippu Fisal Sheriff
  • 2,177
  • 11
  • 19