mirror of
https://github.com/bitwarden/android.git
synced 2024-12-24 18:08:26 +03:00
Set Android InputType directly for the pin lock screen to force numeric-only keyboard layout. (#451)
* Set Android InputType directly for the pin lock screen to force numeric-only keyboard layout. * Renamed variable
This commit is contained in:
parent
60c5bbc73d
commit
8053e6cb81
3 changed files with 9 additions and 2 deletions
|
@ -66,6 +66,11 @@ namespace Bit.Android.Controls
|
|||
Control.SetRawInputType(InputTypes.TextFlagNoSuggestions | InputTypes.TextVariationVisiblePassword);
|
||||
}
|
||||
|
||||
if(_view.NumbersOnly)
|
||||
{
|
||||
Control.SetRawInputType(InputTypes.ClassNumber | InputTypes.NumberVariationPassword);
|
||||
}
|
||||
|
||||
_view.ToggleIsPassword += ToggleIsPassword;
|
||||
|
||||
if(_view.FontFamily == "monospace")
|
||||
|
|
|
@ -57,6 +57,7 @@ namespace Bit.App.Controls
|
|||
public bool DisableAutocapitalize { get; set; }
|
||||
public bool AllowClear { get; set; }
|
||||
public bool HideCursor { get; set; }
|
||||
public bool NumbersOnly { get; set; }
|
||||
|
||||
// Need to overwrite default handler because we cant Invoke otherwise
|
||||
public new event EventHandler Completed;
|
||||
|
|
|
@ -21,7 +21,8 @@ namespace Bit.App.Controls
|
|||
{
|
||||
Keyboard = Keyboard.Numeric,
|
||||
TargetMaxLength = 4,
|
||||
HideCursor = true
|
||||
HideCursor = true,
|
||||
NumbersOnly = true
|
||||
};
|
||||
|
||||
Entry.BackgroundColor = Entry.TextColor = Color.Transparent;
|
||||
|
|
Loading…
Reference in a new issue