title: How to make ImageButtons bounds wrap around the image?
body: <p>I'm making a GUI for an android app, this GUI contains a four direction <code>ImageButtons</code> (look at the following image):</p>
  
  <p><img src="https://i.stack.imgur.com/5CtY8.png" alt="enter image description here"></p>
  
  <p>but when trying to make that always fails because a square reserved for each image, and that's what i reached :</p>
  
  <p><img src="https://i.stack.imgur.com/C1GFd.png" alt="enter image description here"></p>
  
  <p>and that's my <strong>XML code</strong> :</p>
  
  <pre><code>&lt;LinearLayout
     android:id="@+id/circle"
     android:layout_weight="4"
     android:orientation="vertical"
     android:layout_marginTop="5dp"
     android:layout_width="wrap_content"
     android:layout_height="wrap_content" &gt;
  
           &lt;LinearLayout
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_gravity="center"
              android:orientation="vertical"&gt;
  
                 &lt;ImageButton
                   android:id="@+id/up"
                   android:layout_width="wrap_content"
                   android:layout_height="wrap_content"
                   android:layout_gravity="center"
                   android:adjustViewBounds="true"
                   android:background="@android:color/transparent"
                   android:clickable="true"
                   android:scaleType="centerInside"
                   android:src="@drawable/remote_button_up"/&gt;
  
           &lt;/LinearLayout&gt;
  
           &lt;LinearLayout
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_gravity="center"
             android:orientation="horizontal"&gt;
  
                &lt;ImageButton
                  android:id="@+id/left"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_gravity="left"
                  android:layout_marginRight="20dp"
                  android:adjustViewBounds="true"
                  android:background="@android:color/transparent"
                  android:clickable="true"
                  android:scaleType="centerInside"
                  android:src="@drawable/remote_button_left"/&gt;
  
                &lt;ImageButton
                  android:id="@+id/right"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_gravity="right"
                  android:adjustViewBounds="true"
                  android:layout_marginLeft="20dp"
                  android:background="@android:color/transparent"
                  android:clickable="true"
                  android:scaleType="centerInside"
                  android:src="@drawable/remote_button_right"/&gt;
  
           &lt;/LinearLayout&gt;
  
           &lt;LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:orientation="vertical"&gt;
  
                &lt;ImageButton
                  android:id="@+id/down"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_gravity="center"
                  android:adjustViewBounds="true"
                  android:background="@android:color/transparent"
                  android:clickable="true"
                  android:scaleType="centerInside"
                  android:src="@drawable/remote_button_down"/&gt;
  
          &lt;/LinearLayout&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>