Get intermediate coordinates

I'm having a class that extends from SimpleOnGestureListener, in that class I got a method: public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY).

Now I can get the e1 and e2 coordinates and I can check what kind of gestures it is but is it possible to get the intermediate coordinates too?


自己找到了:

    View testview = (View) findViewById(R.id.testView);

        // Set the touch listener for the main view to be our custom gesture listener
        testview.setOnTouchListener(new View.OnTouchListener() {
            public boolean onTouch(View v, MotionEvent event) {
                if(event.getAction() == MotionEvent.ACTION_MOVE)
                {
                    Log.d("Gestures","Moving...");
                }
            }
链接地址: http://www.djcxy.com/p/91234.html

上一篇: Swipt探测器手势android

下一篇: 获取中间坐标