title: DensityPixel doesn't seem to work with ImageButton
body: <p>For a game I have six buttons which look good on mdpi. The 4 left buttons are 100x100px:</p>
  
  <p><img src="https://i.stack.imgur.com/FHeB7.jpg" alt="Scaling ok"></p>
  
  <p>If I switch to hdpi, it looks like this:</p>
  
  <p><img src="https://i.stack.imgur.com/Ceskh.jpg" alt="Scaling not ok"></p>
  
  <p>The xml looks like this (I omitted all but one button to keep it simple):</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@+id/gameContainer"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="vertical" &gt;
  
      &lt;FrameLayout
          android:layout_width="match_parent"
          android:layout_height="0dp"
          android:layout_weight="1.0"
          android:orientation="vertical" &gt;
  
          &lt;com.mydomain.mygame.game.GameSurface
              android:id="@+id/gameSurface"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:background="@drawable/background_game" &gt;
          &lt;/com.mydomain.mygame.game.GameSurface&gt;
  
          &lt;RelativeLayout
              android:id="@+id/controlButtonContainer"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:orientation="horizontal" &gt;
  
              &lt;ImageButton
                  android:id="@+id/button_left"
                  android:layout_width="100dp"
                  android:layout_height="100dp"
                  android:layout_alignParentBottom="true"
                  android:layout_marginBottom="100dp"
                  android:contentDescription="@string/button_left"
                  android:background="@drawable/control_button" /&gt;
  
          &lt;/RelativeLayout&gt;
      &lt;/FrameLayout&gt;
  
      &lt;LinearLayout
          android:id="@+id/emptyBar"
          android:layout_width="match_parent"
          android:layout_height="40dp"
          android:baselineAligned="false"
          android:gravity="center"
          android:orientation="horizontal" &gt;
      &lt;/LinearLayout&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>These attempts didn't work:
  I tried to use <strong>100dp</strong> instead of <strong>wrap_content</strong>. I tried <strong>src</strong> instead of <strong>background</strong> as well as I tried different <strong>scaleType</strong> attributes.</p>
  
  <p>Probably I could calculate the scaling factor in code, but I can't imagine that this is the proper way to do that. Why does it not scaled automatically, because what are <strong>dp</strong> then for? So how can I configure the right ratio in xml?</p>