Hey I got the solutions to this, you first have to set the drawable to the ProgressBar by calling setProgresssDrawable(drawable) and only then set the value and not vice versa. That'll work.
To set a progress drawable:
Use a drawable xml file like this one:
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@android:id/background">
<shape>
<corners android:radius="5dip" />
<gradient android:startColor="#00CCCC"
android:centerColor="#00CCCC" android:centerY="0.75"
android:endColor="#00CCCC" android:angle="270" />
</shape>
</item>
<item android:id="@android:id/secondaryProgress">
<clip>
<shape>
<corners android:radius="5dip" />
<gradient android:startColor="#00CCCC"
android:centerColor="#00CCCC" android:centerY="0.75"
android:endColor="#00CCCC" android:angle="270" />
</shape>
</clip>
</item>
<item android:id="@android:id/progress">
<clip>
<shape>
<corners android:radius="5dip" />
<gradient android:startColor="#00CCCC" android:centerColor="#00CCCC"
android:centerY="0.75" android:endColor="#00CCCC" android:angle="270" />
</shape>
</clip>
</item>
save this into your /drawable folder and use it in the setProgressDrawable(drawable) function