1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-25 12:43:39 +00:00

turn off uppercase for some android buttons

This commit is contained in:
Kyle Spearrin
2016-08-18 00:20:21 -04:00
parent a42c7a5198
commit 1ca4cceec8
4 changed files with 41 additions and 2 deletions

View File

@@ -14,6 +14,7 @@ namespace Bit.Android.Controls
{
base.OnElementChanged(e);
SetPadding();
SetUppercase();
}
protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e)
@@ -23,6 +24,10 @@ namespace Bit.Android.Controls
{
SetPadding();
}
else if(e.PropertyName == ExtendedButton.UppercaseProperty.PropertyName)
{
SetUppercase();
}
}
private void SetPadding()
@@ -37,5 +42,14 @@ namespace Bit.Android.Controls
(int)element.Padding.Bottom);
}
}
private void SetUppercase()
{
var element = Element as ExtendedButton;
if(element != null && !element.Uppercase)
{
Control.TransformationMethod = null;
}
}
}
}