allow disabling the Long tap tp capture feature

This commit is contained in:
tibbi
2016-06-18 18:16:43 +02:00
parent 68e7a8de1e
commit 4fdfa9b157
7 changed files with 77 additions and 3 deletions

View File

@ -72,7 +72,6 @@ public class Preview extends ViewGroup implements SurfaceHolder.Callback, View.O
canTakePicture = false;
surfaceView.setOnTouchListener(this);
surfaceView.setOnClickListener(this);
surfaceView.setOnLongClickListener(this);
isFlashEnabled = false;
isVideoMode = false;
isSurfaceCreated = false;
@ -143,6 +142,9 @@ public class Preview extends ViewGroup implements SurfaceHolder.Callback, View.O
initRecorder();
}
final boolean isLongTapEnabled = Config.newInstance(getContext()).getLongTapEnabled();
surfaceView.setOnLongClickListener(isLongTapEnabled ? this : null);
return true;
}