I have a progressBar using the ProgressBar class.
Just doing this:
progressBar = new ProgressBar(this, null, android.R.attr.progressBarStyleHorizontal);
I need to change the color of that one, using input value like so:
int color = "red in RGB value".progressBar.setColor(color)
or something like that…
I can’t use an XML layout because the progress bar is customizable for users.
As I found help on a topic here but can’t remember the link, I’m posting my full solution which works great for my needs:
And here is the code to convert DECIMAL color values to HEXADECIMAL:
I think the last method is not that clean but it works well.
Hope this well help, too much time wasted on this progressbar.