From 9b2f596d1573aaf559ff60cd792e11cabf4fdd86 Mon Sep 17 00:00:00 2001 From: mpbw2 <59324545+mpbw2@users.noreply.github.com> Date: Thu, 18 Jan 2024 11:31:16 -0500 Subject: [PATCH] Move Android camera/scan changes to xaml --- src/Core/Pages/Vault/ScanPage.xaml | 3 +++ src/Core/Pages/Vault/ScanPage.xaml.cs | 7 ------- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/Core/Pages/Vault/ScanPage.xaml b/src/Core/Pages/Vault/ScanPage.xaml index 99c71665f..d7cc34de9 100644 --- a/src/Core/Pages/Vault/ScanPage.xaml +++ b/src/Core/Pages/Vault/ScanPage.xaml @@ -47,6 +47,9 @@ Camera="{Binding Camera}" AutoStartPreview="{Binding AutoStartPreview}" NumCamerasDetected="{Binding NumCameras, Mode=OneWayToSource}" + WidthRequest="{OnPlatform Android=150}" + HeightRequest="{OnPlatform Android=150}" + Scale="{OnPlatform Android=4}" Grid.Column="0" Grid.Row="0" Grid.RowSpan="3" /> diff --git a/src/Core/Pages/Vault/ScanPage.xaml.cs b/src/Core/Pages/Vault/ScanPage.xaml.cs index fc71c96c5..a3d78f293 100644 --- a/src/Core/Pages/Vault/ScanPage.xaml.cs +++ b/src/Core/Pages/Vault/ScanPage.xaml.cs @@ -54,13 +54,6 @@ namespace Bit.App.Pages { if (_cameraView == null) { return; } - if (DeviceInfo.Platform == DevicePlatform.Android) - { - // Reduce the size of the camera view to improve performance, scale it up to fill the space - _cameraView.WidthRequest = _cameraView.HeightRequest = 150; - _cameraView.Scale = 4; - } - ViewModel.StartCameraCommand?.Execute(this); _pageIsActive = true;