mirror of
https://github.com/bitwarden/mobile
synced 2025-12-11 13:53:29 +00:00
Move Android camera/scan changes to xaml
This commit is contained in:
@@ -47,6 +47,9 @@
|
|||||||
Camera="{Binding Camera}"
|
Camera="{Binding Camera}"
|
||||||
AutoStartPreview="{Binding AutoStartPreview}"
|
AutoStartPreview="{Binding AutoStartPreview}"
|
||||||
NumCamerasDetected="{Binding NumCameras, Mode=OneWayToSource}"
|
NumCamerasDetected="{Binding NumCameras, Mode=OneWayToSource}"
|
||||||
|
WidthRequest="{OnPlatform Android=150}"
|
||||||
|
HeightRequest="{OnPlatform Android=150}"
|
||||||
|
Scale="{OnPlatform Android=4}"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Grid.Row="0"
|
Grid.Row="0"
|
||||||
Grid.RowSpan="3" />
|
Grid.RowSpan="3" />
|
||||||
|
|||||||
@@ -54,13 +54,6 @@ namespace Bit.App.Pages
|
|||||||
{
|
{
|
||||||
if (_cameraView == null) { return; }
|
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);
|
ViewModel.StartCameraCommand?.Execute(this);
|
||||||
|
|
||||||
_pageIsActive = true;
|
_pageIsActive = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user