do not react to the click event at the end of zooming

This commit is contained in:
tibbi 2016-08-29 14:51:43 +02:00
parent 73f17fe8ed
commit a61c31a24c
1 changed files with 8 additions and 1 deletions

View File

@ -61,6 +61,7 @@ public class Preview extends ViewGroup
private static boolean mSetupPreviewAfterMeasure;
private static boolean mFocusBeforeCapture;
private static boolean mForceAspectRatio;
private static boolean mWasZooming;
private static int mLastClickX;
private static int mLastClickY;
private static int mInitVideoRotation;
@ -203,6 +204,8 @@ public class Preview extends ViewGroup
if (mCamera != null)
mCamera.setParameters(mParameters);
mWasZooming = true;
mSurfaceView.setSoundEffectsEnabled(false);
return true;
}
});
@ -737,7 +740,11 @@ public class Preview extends ViewGroup
@Override
public void onClick(View v) {
if (!mWasZooming)
focusArea(false);
mWasZooming = false;
mSurfaceView.setSoundEffectsEnabled(true);
}
@Override