Android progress bar is always indeterminate on changing its style to progressBarStyleInverse from progressBarStyleHorizontal
<p>I am trying to place a circular progress bar, start it initially in indeterminate mode and as soon as the download starts and progress is available convert it to determinate mode and set its progress. Code works absolutely fine when using style progressBarStyleHorizontal and as soon as I change it to progressBarStyleInverse setting the progress has no effect. Progress bar starts indeterminate and continues for ever the same. </p>

<p>What surprised me is on setting android:indeterminate=false in xml also has no effect. </p>

<p>Here is the declaration of progress bar in xml</p>

<pre><code>&lt;ProgressBar
                    style="?android:attr/progressBarStyleHorizontal"
                    android:indeterminate="false"
                    android:layout_gravity = "center"
                    android:layout_height="wrap_content"
                    android:layout_width="wrap_content"/&gt;
</code></pre>

<p>This is how am updating my progress bar progress. Obviously I have an id to it I have removed it in xml pasted. I have the reference of progress bar which I got using findViewById.(Reference to progress bar is not an issue, if you are thinking thats the issue)</p>

<pre><code>holder.progressbar.setIndeterminate(false);
holder.progressbar.invalidate();
holder.progressbar.setProgress(/*value */);
</code></pre>

<p>What mistake am I making?? Please help. I wasted almost 5 hours on this issue. Please help.</p>

<p>Thanks in advance.</p>