I want to develop a custom component which draws part of the circle based on different values. e.g draw 1/4 cirle, 1/2 circle etc. The component needs to be animated to display drawing process. The partial circle is drawn on top of a static imageview, and I plan to use two views, animated one on top of the static one. Any suggestion how to develop this?
I put the screenshot for reference.
Please refer to the picture, and get a feel how it looks like. Thanks!
Thanks in advance.
You have to draw the circle view, and after that you should create an animation to it.
Creating the circle view:
Creating the animation class to set the new angle:
Put circle into your layout:
And finally starting the animation:
The result is:
As extra from @JohnCordeiro answer. I have added parameters from xml to reuse the circle and to fill the circle if needed.
And on the xml:
Here the result: Note the semi-transparent fill of the button