mirror of
https://github.com/FossifyOrg/Camera.git
synced 2026-06-12 01:58:07 -04:00
allow disabling the Long tap tp capture feature
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user