我可以在Android中检查拼写,就像在Word中完成一样吗?

时间:2012-02-10 06:46:39

标签: android spell-checking

如果您在MS Word中输入任何内容,它不会自动完成或自动更正您的单词,它只会强调错误的单词。

可以在Android中实现类似的功能。

我搜索了很多论坛和网站,他们都将检查拼写称为自动完成或自动更正。

感谢您的帮助

2 个答案:

答案 0 :(得分:0)

请检查SpellCheckerSession http://developer.android.com/reference/android/view/textservice/SpellCheckerSession.html

另外,在提问之前,您应该尝试使用Google。

答案 1 :(得分:0)

简单回答:

String text = textView.getText();
if (!listOfAcceptableText.contains(text)) {
    SpannableString content = new SpannableString(text);
    content.setSpan(new UnderlineSpan(), 0, content.length(), 0);
    textView.setText(content);
}
相关问题