Tinting ProgressBar

suggest change

Using an AppCompat theme, the ProgressBar’s color will be the colorAccent you have defined.

To change the ProgressBar color without changing the accent color you can use theandroid:theme attribute overriding the accent color:

<ProgressBar  
    android:theme="@style/MyProgress"
    style="@style/Widget.AppCompat.ProgressBar" />

<!-- res/values/styles.xml -->
<style name="MyProgress" parent="Theme.AppCompat.Light">  
    <item name="colorAccent">@color/myColor</item>
</style>

To tint the ProgressBar you can use in the xml file the attributes android:indeterminateTintMode and android:indeterminateTint

<ProgressBar
    android:indeterminateTintMode="src_in"
    android:indeterminateTint="@color/my_color"
/>

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents