There is no method to get the current background color of CardView. There is a method to set the background like
It looks like a
getCardBackgroundColor() method has indeed been added to
CardView, but in a rather recent version, so just make sure your support library version is up to date.
Do note that this method returns a
ColorStateList rather than a single color value. Calling
getDefaultColor() on that will give you the normal background color.
int backgroundColor = cardView.getCardBackgroundColor().getDefaultColor();