title: Issue with color using ProgressBar.setProgressDrawable
body: <p>I am appending progressbar in elements of a list and also dynamically updating that progressbar.
  But the odd situation that i m facing is that..</p>
  
  <p>When i have more than one element in my list and i change the color of progressbar by using <code>Progressbar.setProgressDrwable(),</code>   all progressbars in the list are updated and their color is changed as desired.</p>
  
  <p>But when I have only one single element in the list this method doesn't work, All I can see the background of my progressbar not the color.</p>
  
  <p>I have also created my XML file for progressbar's background and color but than also its not working.</p>
  
  <p>My XMl code for ProgressDrawable is </p>
  
  <p>FirstColor.xml
  
  </p>
  
  <pre><code>&lt;item android:id="@android:id/background"&gt;
      &lt;shape&gt;
          &lt;corners android:radius="15dip" /&gt;
          &lt;gradient android:startColor="#A9A9A9" android:centerColor="#A9A9A9"
              android:endColor="#A9A9A9" android:angle="90" /&gt;
          &lt;stroke android:width="5dp" android:color="#A9A9A9" /&gt;
      &lt;/shape&gt;
  &lt;/item&gt;
  
  &lt;item android:id="@android:id/progress"&gt;
       &lt;scale  android:scaleGravity="left" android:scaleWidth="100%" &gt;
          &lt;shape&gt;
              &lt;corners android:radius="15dip" /&gt;
              &lt;gradient android:startColor="#ADFF2F" android:centerColor="#ADFF2F"
                  android:endColor="#ADFF2F" android:angle="90" /&gt;
              &lt;stroke android:width="5dp" android:color="#ADFF2F" /&gt;
          &lt;/shape&gt;
      &lt;/scale&gt;
  &lt;/item&gt;
  </code></pre>
  
  <p>    </p>
  
  <p>SecondColor.xml
  
  </p>
  
  <pre><code>&lt;item android:id="@android:id/background"&gt;
      &lt;shape&gt;
          &lt;corners android:radius="15dip" /&gt;
          &lt;gradient android:startColor="#A9A9A9" android:centerColor="#A9A9A9"
              android:endColor="#A9A9A9" android:angle="90" /&gt;
          &lt;stroke android:width="5dp" android:color="#A9A9A9" /&gt;
      &lt;/shape&gt;
  &lt;/item&gt;
  
  &lt;item android:id="@android:id/progress"&gt;
      &lt;scale android:scaleGravity="left" android:scaleWidth="100%" &gt;
          &lt;shape&gt;
              &lt;corners android:radius="15dip" /&gt;
              &lt;gradient android:startColor="#FFBF00" android:centerColor="#FFBF00"
                  android:endColor="#FFBF00" android:angle="90" /&gt;
              &lt;stroke android:width="5dp" android:color="#FFBF00" /&gt;
          &lt;/shape&gt;
      &lt;/scale&gt;
  &lt;/item&gt;
  </code></pre>
  
  <p></p>
  
  <p>and the java code that i m using to change the color of progressbar is </p>
  
  <p>progressbar1.setProgressDrawable(getResources().getDrawable(R.drawable.FirstColor));
                      progressbar1.setProgress(amntPercentage.intValue());</p>
  
  <p>progressbar1.setProgressDrawable(getResources().getDrawable(R.drawable.SecondColor));
                      progressbar1.setProgress(amntPercentage.intValue());</p>
  
  <p>If anyone out there can solve my problem it would be a great help..
  Thanks in advance..</p>