请问为什么我的EditText输入英文的时候,在出现标点时,怎么单词下面会突然出现红色下划线
5条回答
- censee 2015-07-20 06:15关注
拼写检查导致,\android\frameworks\base\core\java\android\widget\Editor.java
private void updateSpellCheckSpans(int start, int end, boolean createSpellChecker) { // Remove spans whose adjacent characters are text not punctuation mTextView.removeAdjacentSuggestionSpans(start); mTextView.removeAdjacentSuggestionSpans(end); if (mTextView.isTextEditable() && mTextView.isSuggestionsEnabled() && !(mTextView instanceof ExtractEditText)) { if (mSpellChecker == null && createSpellChecker) { mSpellChecker = new SpellChecker(mTextView); } if (mSpellChecker != null) { //mSpellChecker.spellCheck(start, end); } } }
注释掉 spellCheck 就不会再出现了。
解决 1无用