I have a specific color that I create programmatically.
I use that color in a GradientDrawable.
I need to override some part of the ProgressBar source code in order to make it use that GradientDrawable in there, when creating the progress fill color, but I dont know which part should I override and where to put my code
This is the progressbar source code:
This is the drawable I want to use, but it doesnt extend accordingly to the progress made
public static GradientDrawable progressBarProgressDrawable(Context context, float[] radii) {
GradientDrawable shape = new GradientDrawable();
shape.setCornerRadii(radii);
shape.setColor(context.getResources().getColor(R.color.green_button));
float brightness = 0.9f;
float[] hsb = new float[] { 43, 23, (33 * brightness) };
int alpha = 77;
int newColor = Color.HSVToColor(alpha, hsb);
shape.setColor(newColor);
return shape;
}