public void OnPictureTaken(byte[] data, Android.Hardware.Camera camera) { camera.StopPreview(); camera.Release(); previewing = false; isPhotoTaken = true; photo = BitmapFactory.DecodeByteArray(data, 0, data.Length); Matrix matrix = new Matrix(); matrix.PostRotate(90); photo = Bitmap.CreateBitmap(photo, 0, 0, photo.Width, photo.Height, matrix, true); surfaceView.Visibility = ViewStates.Invisible; acceptButton.Visibility = ViewStates.Visible; cancelButton.Visibility = ViewStates.Visible; imageView.Visibility = ViewStates.Visible; buttonLayout.SetBackgroundColor(Color.ParseColor("#80000000")); imageView.SetImageBitmap(photo); }
public void OnPictureTaken(byte[] data, Android.Hardware.Camera camera) { camera.StopPreview(); pictureData = data; redoBtn.Visibility = ViewStates.Visible ; okBtn.Visibility = ViewStates.Visible; captureBtn.Visibility = ViewStates.Gone; //Android.Widget.Toast.MakeText(Application.Context, (data==null).ToString()+data.Length, ToastLength.Long).Show(); }