title: Android - Drawable XML containing image on left and solid color to fill width
body: <p>I'm trying to create an XML drawable which will have an image on the left, and then a solid background which will fill the rest of the width where ever the drawable is used.  The background color is the same color I have in the image itself, and the purpose is to continue the color for the full width.</p>
  
  <p>I've tried this, but this just gives me the image in the center of the View which I apply it to.  What I want is the image on the left, and then to the right of the image the background color to fill whatever remaining space is left.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;layer-list xmlns:android="http://schemas.android.com/apk/res/android"
      &gt;
      &lt;item&gt;
          &lt;shape android:shape="rectangle"&gt;
              &lt;solid android:color="#00355f"/&gt;
          &lt;/shape&gt;
      &lt;/item&gt;
      &lt;item
          android:drawable="@drawable/bg_navbar"
          android:gravity="center_vertical|start"/&gt;
  &lt;/layer-list&gt;
  </code></pre>
  
  <p>The obvious solution is to make a LinearLayout with my background color and then drop the image into it, but since this is used throughout my app, I was hoping to be able to create an XML drawable resource instead.</p>