ProgressBar.setProgressDrawable not working for Android 2.3
<p>I am currently working with a dynamically updating <code>ProgressBar</code>.  Through certain percentages, the progessbar sets a drawable of a different color.  We currently have various colored clip drawable defined in a drawable xml.  The one entitled <code>progressbar_blue_states</code> is detailed as follows: </p>

<pre><code>&lt;layer-list xmlns:android="http://schemas.android.com/apk/res/android" &gt;

  &lt;item android:id="@android:id/background"
      android:drawable="@drawable/progressbar_grey"&gt;
  &lt;/item&gt;

  &lt;item android:id="@android:id/progress"&gt;
      &lt;clip android:drawable="@drawable/progressbar_blue" /&gt;
  &lt;/item&gt;
&lt;/layer-list&gt;
</code></pre>

<p>Whenever we need to update the dialog, we call the following code:</p>

<pre><code>progressBar.setProgressDrawable(getResources().getDrawable(R.drawable.progressbar_blue_states));
</code></pre>

<p>However, not only does this not update the ProgressBar, but also it takes out the progress bar altogether where whitespace is left in it's place.  However, if I set <code>android:progressDrawable="@drawable/progressbar_blue_states"</code> in the xml and take out this <code>setProgressDrawable()</code> call, it loads correctly.  We need the setProgressDrawable to update the colors as needed.  </p>

<p>This call works fine in Android 4.0+ however in Android 2.3 we're running into some trouble.  Any ideas?</p>

<p><strong>Edit</strong></p>

<p>This is how we set up the ProgressBar in the xml:</p>

<pre><code>&lt;ProgressBar android:id="@+id/progress"
            style="?android:attr/progressBarStyleHorizontal"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:layout_marginBottom="2dp"
            android:indeterminate="false"
            android:indeterminateOnly="false"
            android:progress="24"
            android:max="100"
            android:progressDrawable="@drawable/progressbar_red_states" /&gt;
</code></pre>
