This piece of code does not work, I can not understand why. sv is SurfaceView, which is used to display the camera (this is for a note).
sv.setOnTouchListener(new View.OnTouchListener() { @Override public boolean onTouch(View view, MotionEvent motionEvent) { if(motionEvent.getAction() == MotionEvent.ACTION_DOWN){ Toast.makeText(MainActivity.this, "onTouch", Toast.LENGTH_SHORT).show(); return true;}}});