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.
This will help much no need to do so much coding :)
ProgressBar spinner = new android.widget.ProgressBar(
context,
null,
android.R.attr.progressBarStyle);
spinner.getIndeterminateDrawable().setColorFilter(0xFFFF0000,android.graphics.PorterDuff.Mode.MULTIPLY);