I want to draw arc on canvas with progress percentage on circle and need to perform click on both the color (blue and green).
How to make click listener for the same.
I want to draw arc on canvas with progress percentage on circle and need to perform click on both the color (blue and green).
How to make click listener for the same.
You have two circle for grean line
Two circle makes green area(difference of inner and outer circle) say circles G1(inner), G2(outer)
first find circles sector area of G1 and G2 say GS1 and GS2.
Now find touch point form on touch event say p1. If p1 lie in GS2 but not in GS1 than you have touched on green line
Similarly you have two circle for Blue line and you can find touch point
See this link also - Efficiently find points inside a circle sector