Ich versuche gerade, das cardElevation-Attribut der CardView zu verwenden. Während die Höhe und der Schatten auf KitKat perfekt funktionieren, erscheint es nicht auf meinem Lollipop-Gerät. Hier ist meine XML:card_view: cardElevation erscheint nur auf 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>
Ich habe beide versucht und weder arbeiten. –