Add gestures without creating gestures

I am working on launching a Gesture based application. I need to add custom gestures from the application to the gesture library. I tried the method with the Gesture builder and copied it to res / raw, it worked. But I need to add more Gestures through my applications add a gesture menu ..help

+6
source share
1 answer

I'm not sure what you want, but if you need to save and modify the GestureLibrary , you can read and write it to the file system as follows:

 final String fileName = "gestures"; final String dir = Environment.getExternalStorageDirectory(); final File storeFile = new File(dir, fileName); final GestureLibrary gesturelib = GestureLibraries.fromFile(storeFile); 

The code for creating gestures, which you can get from the GestureBuilder example (Sorry, I found only this source, but it copies a well-known example with changed variable names) and read in how-to .

Or what gestures did you ask?

+2
source

Source: https://habr.com/ru/post/899746/


All Articles