為什么我在setOnTouchListener時(shí)MOVE事件總是不走
只響應(yīng)DOWN,其他沒有,我就是按照著老師的來的,不知道怎么回事,以前也遇到過
????findViewById(R.id.ll_circleview_root).setOnTouchListener(new?View.OnTouchListener()?{ ???@Override ???public?boolean?onTouch(View?v,?MotionEvent?event)?{ ???????int?action?=?event.getActionMasked(); ???????Logger.e("action?=?"?+?action); ???????switch?(action)?{ ???????????case?MotionEvent.ACTION_DOWN: ???????????????break; ???????????case?MotionEvent.ACTION_MOVE: ???????????????break; ???????????default: ???????????????break; ???????} ???????return?false; ???} });
2017-07-20
在case MotionEvent.ACTION_DOWN:
要處理的事
return true;(表示消費(fèi)了這個(gè)事件)
move事件也是如此