Reputation: 421
I am trying to detect when a user draws a number on the screen, for example, number one can be translated as a top to down movement with a reasonable angle (+- 10 degrees on the y-axis), what I am doing is checking the direction of the motion and giving it an angle range to check the line within. this technique usually works for most digits.
for more complicated numbers I am dividing the resulting shape into lines based on the direction on movement, for example two is a result of the following lines: - line with direction North east and an angle between 10 and 30 degrees with the x axis - line with direction South east and an angle between -10 and -30 degrees with the x axis ....
Is there an easier way to do this, or maybe there is something already out there which do this :) , I am worried about checking errors in the motion that might happen and should be tolerated, such as unexpected slight finger movements
Upvotes: 1
Views: 329
Reputation: 14751
It sounds like you should be using the android.gesture library. This lets you create a library of gestures as resources in your program, and provides the API for detecting the library of gestures.
Upvotes: 2