display circle in android using drawarc method
how to create circle in android using drawarc method. or how to split a circle in 6 parts. each part contain differ开发者_如何学运维ent color.
I would create an array holding 6 colors (paint), then use a loop to create the 6 parts of the arc
Like
for(int i = 0; i < color.length; i++){
drawArc (RectF oval, 60*i , 60*(i+1), True, color(i))
}
Or
for(int i = 0; i < color.length; i++){
drawArc (RectF oval, (360/color.length)*i , (360/color.length)*(i+1), True, color(i))
}
精彩评论