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