title: How to scale and centre a drawable inside layer-list android?
body: <p>I'm trying to center a drawable image with some padding on either side to use as a splash screen logo. The problem is it's either stretched across the entire screen or ignores any padding if I use <code>gravity</code>.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  </code></pre>
  
  <p></p>
  
  <pre><code>&lt;item
      android:drawable="@color/grey_3"/&gt;
  
  &lt;item android:gravity="top|center_horizontal|center_vertical" android:drawable="@drawable/zc_logo_r"
        android:top="100dp"
        android:left="200dp"
        android:right="200dp"
        android:layout_margin="100dp"
      &gt;
  &lt;/item&gt;
  </code></pre>
  
  <p></p>
  
  <p>I've tried using a bitmap, <code>android:gravity="fill_horizontal"</code> and various other suggestions on SO with the same result.  </p>
  
  <p>How can I scale and center the image in my xml?</p>