mirror of
https://github.com/bitwarden/android.git
synced 2024-12-24 01:48:25 +03:00
reveal hidden value for custom fields
This commit is contained in:
parent
590fe211c4
commit
3ea81ce2fb
1 changed files with 13 additions and 1 deletions
|
@ -174,7 +174,7 @@ namespace Bit.App.Pages
|
|||
case FieldType.Hidden:
|
||||
var hidden = field.Type == FieldType.Hidden;
|
||||
|
||||
var textFieldCell = new FormEntryCell(label, isPassword: hidden);
|
||||
var textFieldCell = new FormEntryCell(label, isPassword: hidden, useButton: hidden);
|
||||
textFieldCell.Entry.Text = value;
|
||||
textFieldCell.Entry.DisableAutocapitalize = true;
|
||||
textFieldCell.Entry.Autocorrect = false;
|
||||
|
@ -183,6 +183,18 @@ namespace Bit.App.Pages
|
|||
{
|
||||
textFieldCell.Entry.FontFamily = Helpers.OnPlatform(
|
||||
iOS: "Menlo-Regular", Android: "monospace", WinPhone: "Courier");
|
||||
textFieldCell.Button.Image = "eye";
|
||||
textFieldCell.Button.Command = new Command(() =>
|
||||
{
|
||||
textFieldCell.Entry.InvokeToggleIsPassword();
|
||||
textFieldCell.Button.Image =
|
||||
"eye" + (!textFieldCell.Entry.IsPasswordFromToggled ? "_slash" : string.Empty);
|
||||
});
|
||||
}
|
||||
|
||||
if(Device.RuntimePlatform == Device.Android && textFieldCell.Button != null)
|
||||
{
|
||||
textFieldCell.Button.WidthRequest = 40;
|
||||
}
|
||||
|
||||
textFieldCell.InitEvents();
|
||||
|
|
Loading…
Reference in a new issue