title: gridView height is too tall when using an imageView inside
body: <p>I'm having an issue with the height for the cells inside the GridView. Each of my cells will have an imageView inside like so:</p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
            android:orientation="vertical"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"&gt;
  
  &lt;GridView
          android:layout_width="fill_parent"
          android:layout_height="fill_parent"
          android:verticalSpacing="10dp"
          android:horizontalSpacing="10dp"
          android:id="@+id/eventGridView" android:numColumns="2"/&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Here is the ImageView for each cell</p>
  
  <pre><code>&lt;com.example.scheduling_android.view.RoundedCornerImageView
          android:layout_width="fill_parent"
          android:layout_height="fill_parent"
          android:maxWidth="150dp"
          android:maxHeight="150dp"
          xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/eventImageView"
          android:adjustViewBounds="false"/&gt;
  </code></pre>
  
  <p>I was playing around with different image size for my imageView. What I got was that whenever my image becomes larger (say, 400 x 400px) the height of the cell becomes very tall (around double the size of the width, note that I set the grid to use 2 columns). However, when I save my image as a smaller size (say, 160 x 160px), the gridView came out correctly. The height and the width matches.</p>
  
  <p>Here's a screenshot:</p>
  
  <p><img src="https://i.stack.imgur.com/60X9h.png" alt="enter image description here"></p>
  
  <p>What seems to be the problem? Could it be that the large image is causing gridView to calculate the height of its cell incorrectly? What can I do to fix this?</p>