1
0
mirror of https://github.com/bitwarden/mobile synced 2026-01-05 18:13:36 +00:00

Added Scale to device info service. Stack layout padding adjsutments depending on android scale.

This commit is contained in:
Kyle Spearrin
2016-08-25 21:43:47 -04:00
parent 5ff9131910
commit 0cdba2a13d
12 changed files with 79 additions and 10 deletions

View File

@@ -28,6 +28,7 @@ namespace Bit.App.Controls
Tapped += FormEditorCell_Tapped;
Editor.AdjustMarginsForDevice();
stackLayout.AdjustPaddingForDevice();
View = stackLayout;
}

View File

@@ -86,7 +86,7 @@ namespace Bit.App.Controls
{
if(deviceInfo.Version < 21)
{
Entry.Margin = new Thickness(-9, 0);
Entry.Margin = new Thickness(-9, 1, -9, 0);
}
else if(deviceInfo.Version == 21)
{
@@ -97,6 +97,11 @@ namespace Bit.App.Controls
{
Entry.AdjustMarginsForDevice();
}
if(containerPadding == null)
{
imageStackLayout.AdjustPaddingForDevice();
}
}
if(!useLabelAsPlaceholder)

View File

@@ -40,6 +40,7 @@ namespace Bit.App.Controls
stackLayout.Spacing = 0;
}
Picker.AdjustMarginsForDevice();
stackLayout.AdjustPaddingForDevice();
Tapped += FormPickerCell_Tapped;

View File

@@ -92,6 +92,9 @@ namespace Bit.App.Controls
{
Button2.Padding = new Thickness(5);
}
containerStackLayout.AdjustPaddingForDevice();
}
containerStackLayout.Children.Add(buttonStackLayout);

View File

@@ -51,6 +51,7 @@ namespace Bit.App.Controls
{
Label.TextColor = Color.Black;
}
stackLayout.AdjustPaddingForDevice();
View = stackLayout;
}