The circular area progress bar and progress circular progress bar of the similar thunder download progress

Source: Internet
Author: User

The circular area progress bar and progress circular progress bar of the similar thunder download progress

Old rules: first:


Briefly describe the implementation principle:
1. Custom view, inheriting View
2. Draw a circle in onDraw and fill it
3. If the total area of the circular area is known, the blue area can be calculated based on the Progress ratio (assuming the maximum progress value is 100 ).
4. The height of the blue part along the vertical diameter can be solved through the geometric relationships such as circle, triangle, slice area, and angle (For details, refer)
5. Draw related geometric figures and fill in appropriate colors


As a control, it is still only a basic function, and some details are not perfect. We will continue to improve and expand it later. The Source Code address is RoundAreaProgressBar.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.