Firstly, this is not a duplicate of the question "how to change the color of the progress bar", it solves my problem, but it creates another one.
So, I have a horizontal progress bar, I keep writing / updating the progress bar, i.e. set the progress to one, then two (up to 100) to simulate% completion, it works well if I do not change the color. However, as you know, on some phones the default resource color for the progress bar is green, some are orange, I want the color to be green on all devices, so in the progress bar attribute I set progressDrawable(recommended for most responses to Stackoverflow) to the following xmlfile
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="5dip" />
<gradient
android:startColor="#4CC417"
android:centerColor="#4CC417"
android:centerY="0.75"
android:endColor="#4CC417"
android:angle="270"
/>
</shape>
If I do this, the progress bar now just displays all the progress (i.e. the final percentage, 100), you do not see the animation from 0 to any percentage.