mirror of
https://github.com/bitwarden/android.git
synced 2024-10-31 15:15:34 +03:00
Implemented specific entry padding for android api 21.
This commit is contained in:
parent
043a4122b4
commit
a7ba21f2f9
2 changed files with 25 additions and 3 deletions
|
@ -1,5 +1,7 @@
|
|||
using System;
|
||||
using Bit.App.Abstractions;
|
||||
using System;
|
||||
using Xamarin.Forms;
|
||||
using XLabs.Ioc;
|
||||
|
||||
namespace Bit.App.Controls
|
||||
{
|
||||
|
@ -79,9 +81,24 @@ namespace Bit.App.Controls
|
|||
|
||||
if(Device.OS == TargetPlatform.Android)
|
||||
{
|
||||
if(!useLabelAsPlaceholder)
|
||||
var deviceInfo = Resolver.Resolve<IDeviceInfoService>();
|
||||
if(useLabelAsPlaceholder)
|
||||
{
|
||||
Entry.Margin = new Thickness(-4, -7, -4, -11);
|
||||
if(deviceInfo.Version == 21)
|
||||
{
|
||||
Entry.Margin = new Thickness(0, 4, 0, -4);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(deviceInfo.Version == 21)
|
||||
{
|
||||
Entry.Margin = new Thickness(-4, -2, -4, -11);
|
||||
}
|
||||
else
|
||||
{
|
||||
Entry.Margin = new Thickness(-4, -7, -4, -11);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -23,6 +23,11 @@ namespace Bit.App.Controls
|
|||
Margin = new Thickness(0, int.MaxValue, 0, 0)
|
||||
};
|
||||
Entry.TextChanged += Entry_TextChanged;
|
||||
|
||||
if(Device.OS == TargetPlatform.Android)
|
||||
{
|
||||
Label.TextColor = Color.Black;
|
||||
}
|
||||
}
|
||||
|
||||
private void Entry_TextChanged(object sender, TextChangedEventArgs e)
|
||||
|
|
Loading…
Reference in a new issue