title: Create CardView applying its cornerRadius to ImageView inside it
body: <p><a href="https://github.com/googlecodelabs/android-design-library/blob/master/app/src/main/res/layout/item_card.xml#L17" rel="nofollow noreferrer">https://github.com/googlecodelabs/android-design-library/blob/master/app/src/main/res/layout/item_card.xml#L17</a></p>
  
  <p>I tried to create a CardView with ImageView with corner Radius in Android application.</p>
  
  <p>I found that when we try to set the cardCornerRadius over 0 like 12dp, it did not apply radius to the ImageView inside of the CardView.</p>
  
  <p>How can I apply radius to the ImageView inside of the CardView?
  Thanks for your help in advance.</p>
  
  <p><a href="https://i.stack.imgur.com/Ckr3v.png" rel="nofollow noreferrer">created image with app:cardCornerRadius="0dp"</a></p>
  
  <p><a href="https://i.stack.imgur.com/mVO4g.png" rel="nofollow noreferrer">created image with app:cardCornerRadius="12dp"</a></p>
  
  <pre><code>&lt;android.support.v7.widget.CardView 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:id="@+id/card_view"
  android:layout_width="match_parent"
  android:layout_height="@dimen/card_height"
  android:layout_gravity="center"
  android:layout_marginBottom="@dimen/md_keylines"
  android:layout_marginLeft="@dimen/md_keylines"
  android:layout_marginRight="@dimen/md_keylines"
  app:cardCornerRadius="12dp" // This radius is not applied to the ImageView with @id/card_image
  android:foreground="?attr/selectableItemBackground"&gt;
  
  &lt;RelativeLayout
      android:layout_width="match_parent"
      android:layout_height="wrap_content"&gt;
  
      &lt;ImageView
          android:id="@+id/card_image"
          android:layout_width="match_parent"
          android:layout_height="@dimen/card_image_height"
          android:scaleType="centerCrop"
          tools:src="@drawable/a" /&gt;
  
      &lt;TextView
          android:id="@+id/card_title"
          android:layout_width="match_parent"
          android:layout_height="@dimen/card_title_height"
          android:layout_alignBottom="@+id/card_image"
          android:layout_marginLeft="@dimen/md_keylines"
          tools:text="@string/item_title"
          android:textAppearance="@style/TextAppearance.AppCompat.Title"
          android:textColor="@color/white" /&gt;
  
      &lt;TextView
          android:id="@+id/card_text"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_below="@+id/card_image"
          android:layout_marginLeft="@dimen/md_keylines"
          android:layout_marginTop="@dimen/md_keylines"
          android:layout_marginBottom="@dimen/md_keylines"
          android:layout_marginRight="@dimen/md_keylines"
          tools:text="@string/item_desc"
          android:ellipsize="end"
          android:singleLine="true"
          android:textColor="@color/dark_grey"
          android:textSize="@dimen/article_subheading" /&gt;
  
      &lt;Button
          android:id="@+id/action_button"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_below="@+id/card_text"
          style="?android:attr/borderlessButtonStyle"
          android:textColor="?attr/colorPrimary"
          android:text="Action" /&gt;
  
      &lt;ImageButton
          android:id="@+id/share_button"
          android:layout_width="@dimen/cards_button_width"
          android:layout_height="@dimen/cards_button_height"
          android:layout_marginRight="@dimen/md_keylines"
          app:srcCompat="@drawable/ic_share"
          android:layout_below="@+id/card_text"
          android:layout_alignParentRight="true"
          style="?android:attr/borderlessButtonStyle"
          android:tint="@color/button_grey" /&gt;
  
      &lt;ImageButton
          android:id="@+id/favorite_button"
          android:layout_width="@dimen/cards_button_width"
          android:layout_height="@dimen/cards_button_height"
          android:layout_marginRight="@dimen/md_keylines"
          app:srcCompat="@drawable/ic_favorite"
          android:layout_below="@+id/card_text"
          android:layout_toLeftOf="@id/share_button"
          style="?android:attr/borderlessButtonStyle"
          android:tint="@color/button_grey" /&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p></p>