title: Android Image Button not wrapping correctly?
body: <p>I set Image Button to wrap content an its layout to do the same, but the buttons still showing something like a padding on the top and the bottom.</p>
  
  <p>I already tried setting padding and margin to 0dp, didn't worked.</p>
  
  <p><a href="http://i.stack.imgur.com/k22wv.png" rel="nofollow">Image of the layout (Please, ignore the two Image Buttons without image source)</a></p>
  
  <p>Code:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:paddingBottom="@dimen/activity_vertical_margin"
      android:paddingLeft="@dimen/activity_horizontal_margin"
      android:paddingRight="@dimen/activity_horizontal_margin"
      android:paddingTop="@dimen/activity_vertical_margin"
      tools:context="arensis.grumpyworld.game"&gt;
  //This is not the image
      &lt;ImageView
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:id="@+id/fondo"
          android:scaleType="fitCenter"
          android:src="@drawable/fondo1"
          android:layout_above="@+id/linearLayout2"
          android:layout_centerHorizontal="true" /&gt;
  //Neither this one.
      &lt;ImageView
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:id="@+id/gato"
          android:scaleType="fitCenter"
          android:src="@drawable/grumpymodel"
          android:layout_above="@+id/linearLayout2"
          android:layout_centerHorizontal="true" /&gt;
  
      &lt;LinearLayout
          android:orientation="horizontal"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:weightSum="3"
          android:layout_gravity="center_vertical"
          android:layout_alignParentBottom="true"
          android:layout_centerHorizontal="true"
          android:layout_marginBottom="0dp"
          android:id="@+id/linearLayout"&gt;
  
          &lt;ImageButton
              android:scaleType="fitCenter"
              android:id="@+id/mapaico"
              android:layout_height="wrap_content"
              android:layout_weight="1"
              android:layout_width="0dp" /&gt;
  
          &lt;ImageButton
              android:scaleType="fitCenter"
              android:layout_height="wrap_content"
              android:layout_weight="1"
              android:layout_width="0dp"
              android:id="@+id/cazaico"
              android:src="@drawable/cazaico" /&gt;
  
          &lt;ImageButton
              android:scaleType="fitCenter"
              android:layout_height="wrap_content"
              android:layout_weight="1"
              android:layout_width="0dp"
              android:id="@+id/dueloico"
              /&gt;
      &lt;/LinearLayout&gt;
  
      &lt;LinearLayout
          android:orientation="horizontal"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:weightSum="3"
          android:layout_above="@+id/linearLayout"
          android:layout_centerHorizontal="true"
          android:layout_marginBottom="0dp"
          android:id="@+id/linearLayout2"&gt;
  
          &lt;ImageButton
              android:scaleType="fitCenter"
              android:id="@+id/gcico"
              android:layout_height="wrap_content"
              android:layout_weight="1"
              android:layout_width="0dp"
              android:src="@drawable/gcico" /&gt;
  
          &lt;ImageButton
              android:scaleType="fitCenter"
              android:layout_height="wrap_content"
              android:layout_weight="1"
              android:layout_width="0dp"
              android:id="@+id/dojoico"
              android:src="@drawable/dojoico" /&gt;
  
          &lt;ImageButton
              android:scaleType="fitCenter"
              android:id="@+id/alquimiaico"
              android:layout_height="wrap_content"
              android:layout_weight="1"
              android:layout_width="0dp"
              android:src="@drawable/alquimiaico" /&gt;
  
      &lt;/LinearLayout&gt;
  
  &lt;/RelativeLayout&gt;</code></pre>
  </div>
  </div>
  </p>