I am adding gesture recognition to my app. I have added the view as described in the Android Developers Gestures article but when it comes to adding:
mLibrary = GestureLibraries.fromRawResource(this, R.raw.gestures);
if(!mLibrary.load()){
finish();
}
where do I put this in my code, do I have to create a new class for it, or can I have it in an inner class, or does it not need a class at all?! I have a set up similar to Lunar Lander which comprises of two files, one of which is a thread that handles pretty much all the physics and drawing of the game. The other file begins the thread and saveInstanceState method.
Furthermore, what type is mLibrary?! I cannot find out anywhere!!
I imagine I will put the OnGesturePerformed method in my thread as this is where I handle all keyUp and Down events.