0

I have the following shape-image

enter image description here

I want to validate my touch events when I touch in the blue area or not in my imageview. I need to combine the arc and the rectangle as one and validate the coordinates of the touch event?

I use this if it was a circle

private boolean isIn3PointArea(float touchX, float touchY, float centerX, float centerY, double r){
    float x = touchX - centerX;
    float y = touchY - centerY;
    return (touchY < centerY && Math.sqrt(x*x+y*y) > r);
}
Miaoulis Nikos
  • 182
  • 1
  • 15

0 Answers0