title: Cardview size on Android
body: <p>So what I wanna do is to have a recycler view with images inside each card.</p>
  
  <p>How can I know the width of each card so I can pass the images to the adapter with the exact size and take the entire space of the card? (I want the images to have all the same size.)</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:id="@+id/card_view"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      card_view:cardCornerRadius="4dp"
      android:layout_margin="5dp"&gt;
  
      &lt;RelativeLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"&gt;
  
  
          &lt;ImageView
              android:layout_width="match_parent"
              android:layout_height="160dp"
              android:id="@+id/phone_card_imageView"
              android:layout_alignParentTop="true"
              android:layout_centerHorizontal="true"/&gt;
  
  
      &lt;/RelativeLayout&gt;
  &lt;/android.support.v7.widget.CardView&gt;
  </code></pre>
  
  <p>This is the code I have on the cardview.</p>