android.support.v7.cardview:cardBackgroundColor doesn't work
<p>I have the following XML code in a resource file, which represents an item in a RecyclerView:</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:android.support.v7.cardview="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android.support.v7.cardview:cardBackgroundColor="#9e9e9e"
    android.support.v7.cardview:cardElevation="7dp"&gt;

    &lt;LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"&gt;
        &lt;LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="@android:color/transparent"
            android:orientation="vertical"&gt;
            &lt;ImageView
                android:id="@+id/type"
                android:layout_width="15dp"
                android:layout_height="15dp"
                android:layout_gravity="end" /&gt;
            &lt;LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal"&gt;
                &lt;TextView
                    android:id="@+id/field_name"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:padding="2dp"
                    android:textColor="#000000"
                    android:textSize="20sp"
                    android:typeface="monospace" /&gt;
                &lt;LinearLayout
                    android:layout_width="15dp"
                    android:layout_height="match_parent" /&gt;
            &lt;/LinearLayout&gt;
            &lt;LinearLayout
                android:id="@+id/main_recyclerview_item_actions"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:gravity="end"
                android:visibility="gone"&gt;
                &lt;Button
                    android:id="@+id/delete"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="@string/delete"
                    android:textColor="@color/colorAccent"
                    style="@style/Widget.AppCompat.Button.Borderless"/&gt;
            &lt;/LinearLayout&gt;
        &lt;/LinearLayout&gt;
    &lt;/LinearLayout&gt;
&lt;/android.support.v7.widget.CardView&gt;
</code></pre>

<p>The problem is that the CardView is never get the color: 9e9e9e as the following image:
The color is white not 9e9e9e</p>

<p><a href="https://i.stack.imgur.com/OFl3S.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OFl3S.png" alt="enter image description here"></a></p>

<p>Where is the problem in the code? And how can I solve this problem?</p>