提交 f56da86f 编写于 作者: J Jason Simmons 提交者: GitHub

Invert the autocorrect flag (#3875)

See https://github.com/flutter/engine/pull/3866
上级 1db18a40
......@@ -79,7 +79,7 @@ public class TextInputPlugin implements MethodCallHandler {
private static int inputTypeFromTextInputType(String inputType,
boolean obscureText,
boolean noAutoCorrect) {
boolean autocorrect) {
if (inputType.equals("TextInputType.datetime"))
return InputType.TYPE_CLASS_DATETIME;
if (inputType.equals("TextInputType.number"))
......@@ -96,7 +96,7 @@ public class TextInputPlugin implements MethodCallHandler {
// Note: both required. Some devices ignore TYPE_TEXT_FLAG_NO_SUGGESTIONS.
textType |= InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS;
textType |= InputType.TYPE_TEXT_VARIATION_PASSWORD;
} else if (!noAutoCorrect) {
} else if (autocorrect) {
textType |= InputType.TYPE_TEXT_FLAG_AUTO_CORRECT;
}
return textType;
......@@ -110,7 +110,7 @@ public class TextInputPlugin implements MethodCallHandler {
outAttrs.inputType = inputTypeFromTextInputType(
mConfiguration.getString("inputType"),
mConfiguration.optBoolean("obscureText"),
mConfiguration.optBoolean("noAutoCorrect"));
mConfiguration.optBoolean("autocorrect", true));
if (!mConfiguration.isNull("actionLabel"))
outAttrs.actionLabel = mConfiguration.getString("actionLabel");
outAttrs.imeOptions = EditorInfo.IME_ACTION_DONE | EditorInfo.IME_FLAG_NO_FULLSCREEN;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册