mirror of
https://github.com/bitwarden/android.git
synced 2024-12-24 18:08:26 +03:00
make sure PIN doesnt show on screen. adjust focus.
This commit is contained in:
parent
0c4c8534b4
commit
25b75fd6e4
5 changed files with 19 additions and 3 deletions
|
@ -66,6 +66,11 @@ namespace Bit.Android.Controls
|
|||
{
|
||||
Control.Typeface = Typeface.Monospace;
|
||||
}
|
||||
|
||||
if(_view.HideCursor)
|
||||
{
|
||||
Control.SetCursorVisible(false);
|
||||
}
|
||||
}
|
||||
|
||||
private void ToggleIsPassword(object sender, EventArgs e)
|
||||
|
|
|
@ -56,6 +56,7 @@ namespace Bit.App.Controls
|
|||
public bool? Autocorrect { get; set; }
|
||||
public bool DisableAutocapitalize { get; set; }
|
||||
public bool AllowClear { get; set; }
|
||||
public bool HideCursor { get; set; }
|
||||
|
||||
// Need to overwrite default handler because we cant Invoke otherwise
|
||||
public new event EventHandler Completed;
|
||||
|
|
|
@ -21,13 +21,19 @@ namespace Bit.App.Controls
|
|||
{
|
||||
Keyboard = Keyboard.Numeric,
|
||||
MaxLength = 4,
|
||||
Margin = new Thickness(0, int.MaxValue, 0, 0)
|
||||
HideCursor = true
|
||||
};
|
||||
|
||||
Entry.BackgroundColor = Entry.TextColor = Color.Transparent;
|
||||
|
||||
if(Device.RuntimePlatform == Device.Android)
|
||||
{
|
||||
Label.TextColor = Color.Black;
|
||||
}
|
||||
else
|
||||
{
|
||||
Entry.Margin = new Thickness(0, int.MaxValue, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
public Label Label { get; set; }
|
||||
|
|
|
@ -87,6 +87,7 @@ namespace Bit.App.Pages
|
|||
{
|
||||
for(int i = 0; i < 5; i++)
|
||||
{
|
||||
await Task.Delay(1000);
|
||||
if(!PinControl.Entry.IsFocused)
|
||||
{
|
||||
Device.BeginInvokeOnMainThread(() => PinControl.Entry.Focus());
|
||||
|
@ -95,8 +96,6 @@ namespace Bit.App.Pages
|
|||
{
|
||||
break;
|
||||
}
|
||||
|
||||
await Task.Delay(1000);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -41,6 +41,11 @@ namespace Bit.iOS.Controls
|
|||
Control.AutocorrectionType = view.Autocorrect.Value ? UITextAutocorrectionType.Yes : UITextAutocorrectionType.No;
|
||||
}
|
||||
|
||||
if(view.HideCursor)
|
||||
{
|
||||
Control.TintColor = UIColor.Clear;
|
||||
}
|
||||
|
||||
if(view.ReturnType.HasValue)
|
||||
{
|
||||
switch(view.ReturnType.Value)
|
||||
|
|
Loading…
Reference in a new issue