mirror of
https://github.com/bitwarden/android.git
synced 2024-12-25 02:18:27 +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);
|
Control.SetRawInputType(InputTypes.TextFlagNoSuggestions | InputTypes.TextVariationVisiblePassword);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(_view.NumbersOnly)
|
||||||
|
{
|
||||||
|
Control.SetRawInputType(InputTypes.ClassNumber | InputTypes.NumberVariationPassword);
|
||||||
|
}
|
||||||
|
|
||||||
_view.ToggleIsPassword += ToggleIsPassword;
|
_view.ToggleIsPassword += ToggleIsPassword;
|
||||||
|
|
||||||
if(_view.FontFamily == "monospace")
|
if(_view.FontFamily == "monospace")
|
||||||
|
|
|
@ -57,6 +57,7 @@ namespace Bit.App.Controls
|
||||||
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; }
|
public bool HideCursor { get; set; }
|
||||||
|
public bool NumbersOnly { 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,7 +21,8 @@ namespace Bit.App.Controls
|
||||||
{
|
{
|
||||||
Keyboard = Keyboard.Numeric,
|
Keyboard = Keyboard.Numeric,
|
||||||
TargetMaxLength = 4,
|
TargetMaxLength = 4,
|
||||||
HideCursor = true
|
HideCursor = true,
|
||||||
|
NumbersOnly = true
|
||||||
};
|
};
|
||||||
|
|
||||||
Entry.BackgroundColor = Entry.TextColor = Color.Transparent;
|
Entry.BackgroundColor = Entry.TextColor = Color.Transparent;
|
||||||
|
|
Loading…
Reference in a new issue