我必须返回false来处理其他一些情况。我想知道motionEvent.action_move
在返回false时如何正常工作。
parentView.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(final View view, MotionEvent motionEvent) {
/* view.performClick(transparentView);*/
int x = (int) motionEvent.getRawX();
int y = (int) motionEvent.getRawY();
switch (motionEvent.getAction()) {
case MotionEvent.ACTION_DOWN:
Log.e("ACTION_DOWN", "x = " + x + " Y = " + y);
pic(x, y);
break;
case MotionEvent.ACTION_MOVE:
Log.e("ACTION_MOVE", "x = " + x + " Y = " + y);
pic(x, y);
break;
case MotionEvent.ACTION_UP:
Log.e("ACTION_UP", "x = " + x + " Y = " + y);
pic(x, y);
break;
}
return false;
}
答案 0 :(得分:0)
我必须实现整个应用程序的多点触控功能,所以如果我返回true,那么活动点击不起作用。所以我返回false.any想法如何实现这个