title: Android customize progress bar
body: <p>I want to know how I can create a progress bar that is like this:
  <a href="https://i.stack.imgur.com/T8Lak.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/T8Lak.png" alt="Sample Progress Bar"></a></p>
  
  <p>I already have drawn the progress of the progress bar in image file, how am i going to put it into the progress bar?</p>
  
  <p>my progress bar XML file :</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 android:id="@android:id/background"&gt;
          &lt;shape&gt;
          &lt;gradient
              android:angle="270"
              android:startColor="#ffffffff"
              android:endColor="#ffffffff"
              android:centerColor="#ffffffff"
              /&gt;
      &lt;/shape&gt;
  &lt;/item&gt;
  
  &lt;item
      android:id="@android:id/progress" &gt;
          &lt;shape&gt;
  
          &lt;/shape&gt;
  
  &lt;/item&gt;
  
  &lt;/layer-list&gt;
  </code></pre>
  
  <p>Thank you!</p>