coordinates - Android gestures -
I'm new to Android. I am creating an app in which I want to get all the dynamic coordinates of the scroll signal. For example, if I want to draw a line, I have to get all the coordinates of that line. How to get it?
I have tried to assume in the array like this:
@ Override Public Boolean On Scroll (Motion Event Me 1, Motion Event Me 2, Float Distance X , Float office y) {x = me1.getRawX () + me2.getRawX (); Xval.add ((int) x); Back true; } @ Override Public Boolean On Touch Event (Motion Event Me) {this.gDetector.onTouchEvent (me); Onscroll (me, me, x, y); Intent I = new intent (); I.putIntegerArrayListExtra ("key0", excel); SetResult (RESULT_OK, i); End(); } Return gDetector.onTouchEvent (me);
This code is only capable of bringing the first coordinate of scroll gestures
You do not get all the coordinates of the line, its incompetence Instead you use the mathematical formula for the distance from point to point, and see if you are close enough if you are close enough ( Do not expect to tap on the line at all), then that point is in line with the line It is.
Comments
Post a Comment