上面准备好后就可以重写 onTouchEvent方法了!!
@Override public boolean onTouchEvent(MotionEvent event) { switch(event.getAction()){ case MotionEvent.ACTION_DOWN: Log.d("MotionEvent", "ACTION_DOWN"); break; case MotionEvent.ACTION_UP: Log.d("MotionEvent", "ACTION_UP"); break; case MotionEvent.ACTION_MOVE: Log.d("MotionEvent", "ACTION_MOVE"); break; } return super.onTouchEvent(event); }