title: Recyclerview items not showing with the same height
body: <p><a href="https://i.stack.imgur.com/urwCV.png" rel="nofollow noreferrer">This is my app where is the problem exists</a></p>
  
  <p><a href="https://i.stack.imgur.com/x7xfj.png" rel="nofollow noreferrer">I want my items to fit like this app</a></p>
  
  <p>I'm using a <code>RecyclerView</code> with <code>GridLayoutManager</code>. My problem as you see in the image that the grid items aren't the same height when one of the items has a longer text. I'm loading the data from firebase and the notify the <code>Adapter</code> when the list has the data. I tried everything but can't find a solution to auto fit the items like the second image attached. Any help, please?</p>
  
  <p>Here is my recyclerview item layout</p>
  
  <pre><code>&lt;FrameLayout
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layoutDirection="rtl"
      &gt;
  
  
  
      &lt;android.support.v7.widget.CardView
          android:layout_height="wrap_content"
          android:layout_width="match_parent"
          app:cardCornerRadius="10dp"
          android:layout_margin="5dp"
          app:cardBackgroundColor="#fff"
          app:cardElevation="5dp"
          &gt;
  
          &lt;LinearLayout
              xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:gravity="center"
              android:orientation="vertical"&gt;
  
              &lt;ImageView
                  android:id="@+id/cartoonImg"
                  android:layout_width="match_parent"
                  android:layout_height="120dp"
                  android:scaleType="fitXY"
                  app:imgUrl="@{cartoon.thumb}"
                  /&gt;
  
              &lt;TextView
                  android:layout_width="wrap_content"
                  android:layout_height="match_parent"
                  tool:text="Cartoon Name"
                  android:gravity="center"
                  android:layout_marginTop="5dp"
                  android:layout_marginBottom="5dp"
                  android:layout_marginRight="2dp"
                  android:layout_marginLeft="2dp"
                  android:textColor="@color/colorPrimary"
                  android:text="@{cartoon.title}" /&gt;
  
          &lt;/LinearLayout&gt;
  
      &lt;/android.support.v7.widget.CardView&gt;
  
  &lt;/FrameLayout&gt;
  </code></pre>