提交 bd09286e 编写于 作者: C Chris Bracken 提交者: GitHub

Improve auto-correct disabling on Android when obscureText is true (#3731)

Some keyboards (e.g., on some Samsung devices, SwiftKey) ignore
InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS and require
InputType.TYPE_TEXT_VARIATION_PASSWORD.
上级 28e50a62
......@@ -86,8 +86,11 @@ public class TextInputPlugin implements MethodCallHandler {
textType |= InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS;
else if (inputType.equals("TextInputType.url"))
textType |= InputType.TYPE_TEXT_VARIATION_URI;
if (obscureText)
if (obscureText) {
// Note: both required. Some devices ignore TYPE_TEXT_FLAG_NO_SUGGESTIONS.
textType |= InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS;
textType |= InputType.TYPE_TEXT_VARIATION_PASSWORD;
}
return textType;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册