android-我需要设计180度图(半饼图)

时间:2015-06-11 14:29:43

标签: android graph

我需要在Android中设计半饼图,我搜索了很多,但找不到任何解决方案。 有没有想过图书馆这样做?或者我可以手动制作吗?

提前谢谢。

enter image description here

1 个答案:

答案 0 :(得分:5)

s think different ! Actually, we can say it is a custom progress bar. I never done anything like this before, but I would check the source code of the original progress bar. From this code, I could understand who they drawing the在Android上填充效果。您需要为半个饼图应用相同的代码!

http://grepcode.com/file_/repository.grepcode.com/java/ext/com.google.android/android/5.0.2_r1/android/widget/ProgressBar.java/?v=source

来自stackoverflow的旧帖子,我认为它可能对于开始是有用的: Semi Circular Progress bar Android - drawing semi circle

研究如何绘制的好项目: https://github.com/f2prateek/progressbutton?source=c