本文整理汇总了C#中Android.StopPreview方法的典型用法代码示例。如果您正苦于以下问题:C# Android.StopPreview方法的具体用法?C# Android.StopPreview怎么用?C# Android.StopPreview使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Android
的用法示例。
在下文中一共展示了Android.StopPreview方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnPictureTaken
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);
}
示例2: OnPictureTaken
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();
}