在android中将手势转换为文本的API或方法
这个问题在这里已经有了答案:
  您可以使用GestureDetector生成String被检测到的姿态时。 
  例如使用OnGestureListener回调: 
// From inside some Context (View, Activity, ...)
GestureDectector detector = new GestureDetector(this, new OnGestureListener() {
    @Override
    public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) {
        gestureDetected("FLING"); // 'gestureDetected' is then a callback to invoke on 'conversion of a gesture into a string'
    }
});
  然后MotionEvent必须“转发”到GestureDetector通过重写,例如View.onTouchEvent(MotionEvent) 
public boolean onTouchEvent(MotionEvent event) {
    return detector.onTouchEvent(event);
}
                        链接地址: http://www.djcxy.com/p/91209.html
                        
                        
                    