title: android:layout_height not working for CardView
body: <p>I am working with CardViews inside a RecyclerView with GridLayoutManager. The problem that I am facing is, <em>the height I specify for the card view inside xml or in java, it doesn't get enforced by the CardView</em>. It seems like the <strong>cumulative height of the child views of the CardView becomes the height of the CardView</strong>. This behavior considering the fact that it's parent's layout parameters that are enforced on its child views.</p>
  
  <p>What am I missing? Am I doing something wrong?</p>
  
  <pre><code>&lt;android.support.v7.widget.CardView
  xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:card_view="http://schemas.android.com/apk/res-auto"
      android:id="@+id/cardView"
      android:layout_width="@dimen/card_view_width"
      android:layout_height="0dp"
      android:layout_marginBottom="6dp"
      android:elevation="10dp"
      android:orientation="horizontal"
      card_view:cardCornerRadius="2dp"
  
      &gt;
  
  &lt;ImageView
   android:layout_width="@dimen/card_view_width"
      android:layout_height="10dp"
  &gt;&lt;/ImageView&gt;
  
  &lt;/android.support.v7.widget.CardView&gt;
  </code></pre>
  
  <p>In this case the height of the card view is 0dp but still the layout designer preview &amp; when the app runs on the device, the size of the card is 10dp.</p>
  
  <p>Best Regards</p>