add a button for toggling front/rear camera

This commit is contained in:
tibbi
2016-04-18 23:41:35 +02:00
parent a556ff10a1
commit 22d2b16ab3
3 changed files with 42 additions and 14 deletions

View File

@@ -39,7 +39,7 @@ public class Preview extends ViewGroup implements SurfaceHolder.Callback, View.O
surfaceHolder.addCallback(this);
surfaceHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
canTakePicture = true;
setOnTouchListener(this);
surfaceView.setOnTouchListener(this);
}
public void setCamera(Camera newCamera) {