Attualmente sto cercando di utilizzare l'attributo cardElevation di CardView. Mentre l'elevazione e l'ombra funzionano perfettamente su KitKat, non appaiono sul mio dispositivo Lollipop. Ecco il mio XML:card_view: cardElevation appare solo su API <21
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="72dp">
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="match_parent"
card_view:cardElevation="4dp"
card_view:cardCornerRadius="2dp"
card_view:cardUseCompatPadding="true">
<!--Stuff on card view-->
</android.support.v7.widget.CardView>
</RelativeLayout>
Ho provato entrambi e nessuno sta lavorando. –