@Override public boolean onTouchEvent(MotionEvent e) { float x = e.getX(); float y = e.getY(); /* very brutal way */ if (mRenderer.buttonClick(x, y)) return true; Point p = new Point(Math.round(x), Math.round(y)); if (e.getAction() == MotionEvent.ACTION_UP) drawController.handleInput(p, 0); else drawController.handleInput(p, 1); return true; }
@Override protected void onTouchEvent(int clientId, int action, int x, int y) { controller.onTouchEvent(action, x, y); if (action == MotionEvent.ACTION_DOWN) { markers.add(new Marker(x, y, radius, markersColors[clientId])); } }