1

I used this technique to crop the camera preview.

The problem is that I do it in a dialog and the camera preview is also drawn outside of the bounds of the dialog:

Screenshot

What can I do?

Community
  • 1
  • 1
AndreKR
  • 32,613
  • 18
  • 106
  • 168
  • try overriding `onDraw` and calling `canvas.clipRect`. might also want to try a `TextureView` instead of a `SurfaceView` – momo May 22 '16 at 23:39
  • I think https://github.com/journeyapps/zxing-android-embedded/blob/master/EMBEDDING.md is describing the same problem. – AndreKR Jan 16 '17 at 11:20

0 Answers0