What would be the best way to make somthing looking like this:

The text on it needs to be customizable, not only numbers, some strings too, depending on context.
From what I see it:
- Create a custom
View
and withinonDraw
perform all the calculations and text alignment. - Style or extend a horizontal
ProgressBar
.
What do you think ?
Extend ProgressBar ... override onDraw()
The primary reason for this is that all of the primary methods are already there and the first rule of object-orientated programming is code-reuse means don't reinvent the wheel.
来源:https://stackoverflow.com/questions/8929062/how-to-make-a-custom-progressbar-in-android