2

I want to create a tracking circle which appears when i touch the screen and moves along the pointer.Right now the code draws a circle on ACTION_DOWN but stays on the initial position.How do I move the circle along with the pointer??

 switch(event.getAction())
        {
            case MotionEvent.ACTION_DOWN:
                path.addCircle(eventX,eventY, 50, Path.Direction.CW);
                path.moveTo(eventX,eventY);
                return true;
            case MotionEvent.ACTION_MOVE:
                path.lineTo(eventX,eventY);

                break;
            case MotionEvent.ACTION_UP:
                break;
            default:
                return false;
        }
zek54
  • 415
  • 3
  • 20

0 Answers0