Custom view has setOnTouchListener called on it but does not override performClick (class extends Activity NOT View)

onTouch() method gets every touch event from underlying view that hasn't been marked as "processed". If your Version2CameraView doesn't handle touch events, they are processed in Activity and your Version2CameraView is passed as View v parameter.

Unfortunately, your JavaCameraView doesn't override performClick(), but you're trying call it on this view. Solution? Add this method to your Version2CameraView class:

@Override
public boolean performClick() {
    // do what you want
    return true;
}