visible w/ no suggestions for password entries

This commit is contained in:
Kyle Spearrin 2017-08-29 15:05:56 -04:00
parent 9d0db3c1e5
commit 9ae39f3900

View file

@ -55,6 +55,11 @@ namespace Bit.Android.Controls
Control.SetRawInputType(Control.InputType |= InputTypes.TextFlagNoSuggestions); Control.SetRawInputType(Control.InputType |= InputTypes.TextFlagNoSuggestions);
} }
if(_view.IsPassword)
{
Control.SetRawInputType(InputTypes.TextFlagNoSuggestions | InputTypes.TextVariationVisiblePassword);
}
_view.ToggleIsPassword += ToggleIsPassword; _view.ToggleIsPassword += ToggleIsPassword;
if(_view.FontFamily == "monospace") if(_view.FontFamily == "monospace")
@ -69,6 +74,7 @@ namespace Bit.Android.Controls
var cursorEnd = Control.SelectionEnd; var cursorEnd = Control.SelectionEnd;
Control.TransformationMethod = _isPassword ? null : new PasswordTransformationMethod(); Control.TransformationMethod = _isPassword ? null : new PasswordTransformationMethod();
Control.SetRawInputType(InputTypes.TextFlagNoSuggestions | InputTypes.TextVariationVisiblePassword);
// set focus // set focus
Control.RequestFocus(); Control.RequestFocus();
@ -85,11 +91,9 @@ namespace Bit.Android.Controls
} }
// show keyboard // show keyboard
var app = XLabs.Ioc.Resolver.Resolve<global::Android.App.Application>(); var imm = Forms.Context.GetSystemService(global::Android.Content.Context.InputMethodService) as InputMethodManager;
var inputMethodManager = imm.ShowSoftInput(Control, ShowFlags.Forced);
app.GetSystemService(global::Android.Content.Context.InputMethodService) as InputMethodManager; imm.ToggleSoftInput(ShowFlags.Forced, HideSoftInputFlags.ImplicitOnly);
inputMethodManager.ShowSoftInput(Control, ShowFlags.Forced);
inputMethodManager.ToggleSoftInput(ShowFlags.Forced, HideSoftInputFlags.ImplicitOnly);
_isPassword = _view.IsPasswordFromToggled = !_isPassword; _isPassword = _view.IsPasswordFromToggled = !_isPassword;
_toggledPassword = true; _toggledPassword = true;