I want to set a android progressbar that looks like this:
How can I achieve this?
UPDATE - SOLUTION:
In the end I was able to achieve the desired result by using a nine-patch imageView and changing the width of this imageView relative to its container. The container reflects the maxiumum (100%) size of the progressbar.
What I've already tried:
Use Android's skew method
progressBar.matrix.setSkew(1f, 0.5f)
Nothing happens, the progressbar still looks like a standard progressbar. I also tried
progressBar.matrix.postSkew(1f, 0.5f),
tried to use other values for setSkew and postSkew and tried to
progressbar.invalidate()
after setting the skew.
Use custom progressBar.progressDrawable
I also considered using a custom progressDrawable, but did not know how to achieve the desired look.
Reason: The Background of the progressbar has to be transparent, so I can't just have overlapping rectangles as considered, for example, here.
Is there a way to make one of the approaches explained above work, or maybe another way to achieve the expected result?
Expected Result:
Actual Result: