/* 用户按下触摸屏、快速移动后松开public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) {//参数解释:// e1:第1个ACTION_DOWN MotionEvent// e2:最后一个ACTION_MOVE MotionEvent// velocityX:X轴上的移动速度,像素/秒// velocityY:Y轴上的移动速度,像素/秒// 触发条件 :// X轴的坐标位移大于FLING_MIN_DISTANCE,且移动速度大于FLING_MIN_VELOCITY个像素/秒if (e1.getX() - e2.getX() > FLING_MIN_DISTANCE&& Math.abs(velocityX) > FLING_MIN_VELOCITY) {// Fling leftToast.makeText(this, "Fling Left", Toast.LENGTH_SHORT).show();} elseif (e2.getX() - e1.getX() > FLING_MIN_DISTANCE&& Math.abs(velocityX) > FLING_MIN_VELOCITY) {// Fling rightToast.makeText(this, "Fling Right", Toast.LENGTH_SHORT).show();}return false;}// 用户长按触摸屏,由多个MotionEvent ACTION_DOWN触发@Overridepublic void onLongPress(MotionEvent e) {// TODO Auto-generated method stub}// 用户按下触摸屏,并拖动,由1个MotionEvent ACTION_DOWN, 多个ACTION_MOVE触发@Overridepublic boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY) {// TODO Auto-generated method stubreturn false;}// 用户长按触摸屏,由多个MotionEvent ACTION_DOWN触发@Overridepublic void onLongPress(MotionEvent e) {// TODO Auto-generated method stub}// 用户按下触摸屏,并拖动,由1个MotionEvent ACTION_DOWN, 多个ACTION_MOVE触发@Overridepublic boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY) {// TODO Auto-generated method stubreturn false;}