title: Progressbar with three sections in Android
body: <p>I have figured out that we can set a secondary progress for a progress bar in android by defining a custom style like following xml code:</p>
  
  <p>res/drawable/custom_profressbar_horizontal.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;![enter image description here][1]
  
  &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;corners android:radius="15dip" /&gt;
                  &lt;gradient
                       android:startColor="#ffffffff"
                       android:centerColor="#ffdddddd"
                       android:centerY="0.50"
                       android:endColor="#ffffffff"
                       android:angle="270" /&gt;
              &lt;/shape&gt;
      &lt;/item&gt;
      &lt;item android:id="@android:id/secondaryProgress"&gt;
          &lt;clip&gt;
              &lt;shape&gt;
                  &lt;corners android:radius="15dip" /&gt;
                  &lt;solid android:color="#ec3910"/&gt;
              &lt;/shape&gt;
          &lt;/clip&gt;
      &lt;/item&gt;
      &lt;item android:id="@android:id/progress"&gt;
           &lt;clip&gt;
               &lt;shape&gt;
                   &lt;corners   android:radius="15dip" /&gt;
                   &lt;gradient android:startColor="#ff0e75af"
                        android:endColor="#ff1997e1"
                        android:angle="90" /&gt;
               &lt;/shape&gt;
           &lt;/clip&gt;
      &lt;/item&gt;
  &lt;/layer-list&gt;
  </code></pre>
  
  <p>and in the layout of my Activity i have this:</p>
  
  <p>activity_maib.xml:</p>
  
  <pre><code>&lt;ProgressBar
      style="@style/CustomProgressBar"
      android:layout_width="fill_parent"
      android:layout_height="30dp"
      android:layout_margin="7dp"
      android:max="100"
      android:progress="50"
      android:secondaryProgress="80" /&gt;
  </code></pre>
  
  <p>and i have this progress bar:</p>
  
  <p><img src="https://i.stack.imgur.com/zV5jb.png" alt="enter image description here"></p>
  
  <p>But i need to have a third progress. how can i do this?</p>
  
  <p>Thanx in advance.</p>