I am using circular progress bar on Android. I wish to change the color of this. I am using
"?android:attr/progressBarStyleLargeInverse"
style. So how to change the color of progress bar.
How to custom the style? Furthermore, what is the definition of the style?
You can use a style for changing the color of progress like below
and use it in the ProgressBar like below
Hope it helps.
For API 21 and Higher. Simply set the indeterminateTint property. Like:
To support pre-API 21 devices:
In the res/drawable folder, put this:
progress.xml
Set
startColor
andendColor
as per your choice .Now set that
progress.xml
inProgressBar
's backgound .Like this
1.First Create an xml file in drawable folder under resource
named "progress.xml"
2.then make a progresss bar using the folloing snippet
This is work for me, just add this line to your progressBar xml code
It takes color value from your Res/Values/Colors.xml -> colorAccent if you change it, your progressBar color changes aswell.