title: Corners ImageView fit inside CardView does not have radius like CardView's corners in Android
body: <p>I am developing an Android App. In my app I am using <code>CardView</code> and <code>ImageView</code> together. But I am having a problem in designing <code>ImageView</code> inside <code>CardView</code>. The problem is with corner radius radius of <code>ImageView</code>. </p>
  
  <p>I have XML layout for adapter item like this.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;android.support.v7.widget.CardView xmlns:card_view="http://schemas.android.com/apk/res-auto"
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_marginTop="5dp"
      android:layout_marginLeft="5dp"
      android:layout_marginRight="5dp"
      card_view:cardCornerRadius="5dp"
      android:layout_width="match_parent"
      android:id="@+id/di_card_container"
      android:layout_height="wrap_content"&gt;
  
      &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
          android:layout_width="match_parent"
          android:layout_height="match_parent"&gt;
  
          &lt;ImageView
              android:id="@+id/di_iv_image"
              android:scaleType="centerCrop"
              android:layout_width="match_parent"
              android:layout_height="wrap_content" /&gt;
  
          &lt;RelativeLayout
              android:padding="10dp"
              android:layout_below="@id/di_iv_image"
              android:layout_alignParentLeft="true"
              android:layout_alignParentBottom="true"
              android:id="@+id/di_name_container"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"&gt;
              &lt;TextView
                  android:textSize="15dp"
                  android:textColor="@color/textColorPrimary"
                  android:id="@+id/di_tv_name"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content" /&gt;
          &lt;/RelativeLayout&gt;
      &lt;/RelativeLayout&gt;
  &lt;/android.support.v7.widget.CardView&gt;
  </code></pre>
  
  <p>As you can see I set, corner radius of <code>CardView</code> to <code>5dp</code> and the <code>ImageView</code> with is fit to the width of its parent <code>CardView</code>. The problem is both top corners of <code>ImageView</code> is not bent like its parent <code>CardView</code>'s corner.</p>
  
  <p>This is the screenshot</p>
  
  <p><a href="https://i.stack.imgur.com/NjHvj.png" rel="noreferrer"><img src="https://i.stack.imgur.com/NjHvj.png" alt="enter image description here"></a></p>
  
  <p>Normally corners of child views of <code>CardView</code> automatically bent like its parent corners if it fit to parent <code>CardView</code>. Is that right? So why is my <code>ImageView</code> is not working?</p>