From what I understand, early in the preview stage there seemed to be no way to set elevation in XML only on CardViews without a hack in Java. Now that the offi
CardView
It solved me by adding
xmlns:card_view="http://schemas.android.com/apk/res-auto"
for example: