title: Why do I get white space on top and on the bottom of my ImageView in my RelativeLayout?
body: <p>I am using a relativelayout to overlay to images. On all screen sizes so far that I have tested (from 2.7 to 10.1 inch) I always get white space on top of my image. In my IDE I always see that my relativelayout is causing the extra space on top and on the bottom of my image.</p>
  
  <p>Why is that? I have set all height attributes to <code>wrap_content</code> and even added the <code>adjustViewBounds</code> attribute.</p>
  
  <p>Note: You should know that my image is a lot bigger in size, meaning that there will be some sort of scaling.</p>
  
  <p>Thanks for your tips!</p>
  
  <p>Here is the code:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:background="#FFFFFF"
      android:orientation="vertical" &gt;
  
  &lt;LinearLayout 
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_gravity="center_horizontal"
      android:orientation="vertical" 
      android:focusable="true"
  android:focusableInTouchMode="true"&gt;
  
  &lt;TextView
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_gravity="center_horizontal"
      android:text="@string/bgf"
      android:textColor="#000000"
      android:textSize="25sp" /&gt;
  
  &lt;RelativeLayout
      android:layout_width="match_parent"
      android:layout_height="wrap_content" &gt;
  
      &lt;ImageView 
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
  
          android:adjustViewBounds="true"
          android:paddingRight="5dp"
          android:paddingLeft="5dp"
          android:paddingBottom="5dp"
          android:layout_gravity="center_horizontal"
          android:layout_centerVertical="true"
          android:layout_centerHorizontal="true"
          android:src="@drawable/cde"
          android:contentDescription="@string/cde" /&gt;
  
      &lt;ImageView
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:adjustViewBounds="true"
          android:layout_gravity="center_horizontal"
          android:layout_centerVertical="true"
      android:layout_centerHorizontal="true"
          android:src="@drawable/fgh"
          android:contentDescription="@string/abc" /&gt;
  
  &lt;/RelativeLayout&gt;
  
  
  &lt;/LinearLayout&gt;
  &lt;/ScrollView&gt;
  </code></pre>