As far as I can tell, you want the line, circle and "a" to be marked with an arc to change with respect to "p", which will be where the user touches.
Line
This part is relatively simple, assuming that you already know how to get the X and Y coordinates that the user clicks. First, you need to override the onDraw method, which will provide you with a canvas to draw on. Then, when the user touches the screen, you can easily draw a line from the center of your screen to the corresponding X and Y coordinates.
A circle
This part will also be relatively simple, since Canvas also has a drawCircle function to easily draw a circle around a given X and Y coordinate with a given radius. To draw a circle corresponding to the user's touch event, simply use the distance function to calculate the distance from the user touching the X and Y coordinates to the center of the screen coordinate, and use this as the radius for your circle.
Arc
Drawing an arc is dynamically relatively difficult to explain, and my friend forces me to go to dinner with her, but this question answers this very clearly, I think.
Also note that you will probably need to clear the canvas of each touch event so that all previous drawings do not begin to stack on top of each other. Greetings.
source share