I am trying to work on Gestures but the problem is I’m not able to understand some of the lines of code in the sample which is present in the developer’s website. Can anyone just explain me the meaning of
prediction.score
prediction.size()
which is used everywhere in Gestures. In any sample app regarding Gestures I find these two, can anyone please let me know about it.
Thanks a lot.
I assumed you’re talking about http://developer.android.com/resources/articles/gestures.html
It looks like this code sample has a typo, instead of
it should be
In this case
predictions.size()indicates the number of gestures that matched the path the user drew on the screen.Prediction.scoreis the level of confidence the framework has that a given Prediction is a match. The referenced page notes that confidence scores below 1.0 indicate poor matches.