Essential Android ProgressBar edit forum

Tinting ProgressBar

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"
/>

Table Of Contents
39 ACRA
64 Menu
85 ProgressBar
112 Loader
119 Xposed
132 Colors
135 Fresco
140 AdMob
147 Button
156 Vk SDK
170 XMPP
176 OpenCV
200 FileIO
203 Moshi
217 Paint
231 AIDL
241 JCodec
243 Okio
255 Looper
  ↑ ↓ to navigate     ↵ to select     Esc to close