public void Initialize() { var view = Inflate(Context, Resource.Layout.PhotoCaptureView, this); _shutterButton = view.FindViewById<ImageView>(Resource.Id.ShutterButton); _swapCameraButton = view.FindViewById<ImageView>(Resource.Id.SwapCameraButton); _cameraPreviewSurface = view.FindViewById<TextureView>(Resource.Id.CameraTextureView); if (Build.VERSION.SdkInt >= BuildVersionCodes.Lollipop) { _controller = new Camera2Controller(this); } else { _controller = new CameraController(this); } _shutterButton.Click += (s, e) => _controller.TakePicture(); _swapCameraButton.Click += (s, e) => _controller.SwapCameras(); }
public SurfaceTextureListener(BaseCameraController controller) { _controller = controller; }