I am using the code below to change the color of Indeterminate ProgressBar. This works well, till KitKat. But on Lollipop, it just stays Green. Can anyone help me out with this. I want to do it through Java and not XML.
Code: This sets the spinner color to pink
pd.getIndeterminateDrawable().setColorFilter(0xFFeA6060,
android.graphics.PorterDuff.Mode.MULTIPLY);
You're using multiply
which means that you will change to a color depending on the current color (which is green):
Try using android.graphics.PorterDuff.Mode.SRC_ATOP
for example.
If want to use the real color that you provided then use PorterDuff.Mode.SRC_IN
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With