title: Android horizontal ProgressBar doesn't match parent
body: <p>I want to use a custom <code>ProgressBar</code> using PNG images for the background and progress. I want something that looks like this :</p>
  
  <p><img src="https://i.stack.imgur.com/BxwSw.png" alt="How it should look"></p>
  
  <p>But instead, I have this:</p>
  
  <p><img src="https://i.stack.imgur.com/RU0hE.png" alt="How it looks"></p>
  
  <p>Here is my background image:</p>
  
  <p><img src="https://i.stack.imgur.com/wruCX.png" alt="ProgressBar"></p>
  
  <p>I would like my <strong><em>background</em></strong> to <strong>fit the screen</strong>, but it doesn't. I can only see a part of my <code>ProgressBar</code>. However, if I set <code>android:indeterminate="true"</code> in my XML layout, the background fits the screen (like in the first image), but I don't want an indeterminate <code>ProgressBar</code>.</p>
  
  <p><strong>Here is my layout</strong> :</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;ProgressBar
      style="?android:attr/progressBarStyleHorizontal"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:id="@+id/progressBarInventory"
      android:progressDrawable="@drawable/custom_progress_bar"
      android:max="10000"
      android:progress="0"/&gt;
  </code></pre>
  
  <p><strong>custom_progress_bar.xml</strong> :</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;layer-list xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_height="wrap_content"
      android:layout_width="wrap_content"&gt;
  
      &lt;item
          android:id="@android:id/background"
          android:drawable="@drawable/progress_bar_back"/&gt;
      &lt;item
          android:id="@android:id/progress"
          android:drawable="@drawable/progress_bar_front"/&gt;
  
  &lt;/layer-list&gt;
  </code></pre>
  
  <p>Thanks for your help !</p>