Android create gesture recognition sample code
The content of this article uses the android.gesture package. The specific example refers to the gesturebuilder program in sample.
1. Gesture creation gesture creation mainly uses gestureoverlayview and gesturelibrary. The parent class of gestureoverlayview is android.widget.framelayout, which is the gesture drawing area. Gesturelibrary class is mainly used to save, delete and store gestures. The following is an example of creating a gesture. As shown in the figure below, you can define a gesture to open csdn.net
1.1. Create drawing area
1.2 monitoring and drawing
1.3. Save gesture
2. Gesture recognition
Gesture recognition also goes through three processes: creating drawing area, monitoring drawing and comparing results. The code is given directly here.