title: CardView not showing on android device (api 21 and below)
body: <p>Hi im creating a home dashboard design at my app with cardviews, the problem is, in api 21 (Android 5.1) the cardview doesnt show. I tried putting hardware acceleration in android manifest but still doesnt work. Here is my code: </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:background="#f2f9ff"
      tools:context=".activity.MainActivity"&gt;
  
      &lt;ImageView
          android:id="@+id/imageView"
          android:layout_width="385dp"
          android:layout_height="273dp"
          android:scaleType="centerCrop"
          app:srcCompat="@drawable/header_img"
          tools:layout_editor_absoluteX="0dp"
          tools:layout_editor_absoluteY="0dp" /&gt;
  
      &lt;ImageView
          android:id="@+id/imageView2"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
  
          android:layout_centerHorizontal="true"
          android:layout_marginTop="29dp"
          app:srcCompat="@drawable/ukssssssss"
          tools:layout_editor_absoluteX="142dp"
          tools:layout_editor_absoluteY="93dp" /&gt;
  
      &lt;TextView
          android:id="@+id/textView"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_below="@+id/imageView2"
          android:layout_centerHorizontal="true"
          android:text="UKS TK CENDEKIA HARAPAN"
          android:textColor="#fff"
          tools:layout_editor_absoluteX="102dp"
          tools:layout_editor_absoluteY="193dp" /&gt;
  
      &lt;GridLayout
          android:id="@+id/mainGrid"
          android:layout_width="383dp"
          android:layout_height="293dp"
          android:layout_alignParentEnd="true"
          android:layout_alignParentRight="true"
          android:layout_below="@+id/textView3"
          android:layout_marginTop="35dp"
          android:layout_weight="8"
          android:alignmentMode="alignMargins"
          android:columnCount="2"
          android:padding="14dp"
          android:rowCount="2"
          tools:layout_editor_absoluteX="1dp"
          tools:layout_editor_absoluteY="239dp"&gt;
  
          &lt;android.support.v7.widget.CardView
              android:layout_width="0dp"
              android:layout_height="0dp"
              android:layout_columnWeight="1"
              android:layout_marginBottom="16dp"
              android:layout_marginLeft="16dp"
              android:layout_marginRight="16dp"
              android:layout_rowWeight="1"
              app:cardCornerRadius="8dp"
              app:cardElevation="8dp"&gt;
  
              &lt;LinearLayout
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_gravity="center_horizontal|center_vertical"
                  android:layout_margin="16dp"
                  android:orientation="vertical"&gt;
  
                  &lt;ImageView
                      android:layout_width="125dp"
                      android:layout_height="55dp"
                      android:layout_gravity="center_horizontal"
                      android:src="@drawable/medicalrecord"
  
                      /&gt;
  
                  &lt;TextView
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:text="Medical Record"
  
                      android:textColor="@android:color/black"
                      android:textSize="12sp"
                      android:textStyle="bold" /&gt;
  
  
              &lt;/LinearLayout&gt;
          &lt;/android.support.v7.widget.CardView&gt;
  
          &lt;android.support.v7.widget.CardView
              android:layout_width="0dp"
              android:layout_height="0dp"
              android:layout_columnWeight="1"
              android:layout_marginBottom="16dp"
              android:layout_marginLeft="16dp"
              android:layout_marginRight="16dp"
              android:layout_rowWeight="1"
              app:cardCornerRadius="8dp"
              app:cardElevation="8dp"&gt;
  
              &lt;LinearLayout
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_gravity="center_horizontal|center_vertical"
                  android:layout_margin="16dp"
                  android:orientation="vertical"&gt;
  
                  &lt;ImageView
                      android:layout_width="125dp"
                      android:layout_height="55dp"
                      android:layout_gravity="center_horizontal"
                      android:src="@drawable/plant" /&gt;
  
                  &lt;TextView
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:text="Nusantara Plants"
  
                      android:textColor="@android:color/black"
                      android:textSize="12sp"
                      android:textStyle="bold" /&gt;
  
  
              &lt;/LinearLayout&gt;
          &lt;/android.support.v7.widget.CardView&gt;
  
          &lt;android.support.v7.widget.CardView
              android:layout_width="0dp"
              android:layout_height="0dp"
              android:layout_columnWeight="1"
              android:layout_marginBottom="16dp"
              android:layout_marginLeft="16dp"
              android:layout_marginRight="16dp"
              android:layout_rowWeight="1"
              app:cardCornerRadius="8dp"
              app:cardElevation="8dp"&gt;
  
              &lt;LinearLayout
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_gravity="center_horizontal|center_vertical"
                  android:layout_margin="16dp"
                  android:orientation="vertical"&gt;
  
                  &lt;ImageView
                      android:layout_width="125dp"
                      android:layout_height="55dp"
                      android:layout_gravity="center_horizontal"
                      android:src="@drawable/healingtherapy" /&gt;
  
                  &lt;TextView
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:text="Healing Therapy"
  
                      android:textColor="@android:color/black"
                      android:textSize="12sp"
                      android:textStyle="bold" /&gt;
  
  
              &lt;/LinearLayout&gt;
          &lt;/android.support.v7.widget.CardView&gt;
  
          &lt;android.support.v7.widget.CardView
              android:layout_width="0dp"
              android:layout_height="0dp"
              android:layout_columnWeight="1"
              android:layout_marginBottom="16dp"
              android:layout_marginLeft="16dp"
              android:layout_marginRight="16dp"
              android:layout_rowWeight="1"
              app:cardCornerRadius="8dp"
              app:cardElevation="8dp"&gt;
  
              &lt;LinearLayout
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_gravity="center_horizontal|center_vertical"
                  android:layout_margin="16dp"
                  android:orientation="vertical"&gt;
  
                  &lt;ImageView
                      android:layout_width="125dp"
                      android:layout_height="55dp"
                      android:layout_gravity="center_horizontal"
                      android:src="@drawable/calendaricon"
  
                      /&gt;
  
                  &lt;TextView
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:text="What's Going On?"
                      android:textAlignment="center"
                      android:textColor="@android:color/black"
                      android:textSize="12sp"
                      android:textStyle="bold" /&gt;
  
  
              &lt;/LinearLayout&gt;
          &lt;/android.support.v7.widget.CardView&gt;
  
      &lt;/GridLayout&gt;
  
      &lt;TextView
          android:id="@+id/textView3"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_below="@+id/textView"
          android:layout_centerHorizontal="true"
          android:layout_marginTop="12dp"
          android:text="Indonesia Sehat"
          android:textColor="#fff"
          android:textSize="18sp"
          android:textStyle="bold" /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>Tried on different android version but it works, and also when in the design view i change it into api 21 it also shows a black cardview instead of a white one. Th question on <a href="https://stackoverflow.com/questions/27043607/android-cardview-doesnt-work-on-api-21">this link</a>doesnt solve my problem, they are asking to solve card elevation, not cardview <strong>not</strong> showing</p>