如何以编程方式在Android中禁用拼写更正方式、Android

由网友(错过一步 就是一生)分享简介:如何以编程方式停用拼写校正的Andr​​oid?用户可以通过设置来禁用它,但我需要在我的应用程序禁用它。 How can I disable the spell correction programmatically in android? User can disable it from settings, but...

如何以编程方式停用拼写校正的Andr​​oid?用户可以通过设置来禁用它,但我需要在我的应用程序禁用它。

How can I disable the spell correction programmatically in android? User can disable it from settings, but I need disable it in my application.

有没有办法做到这一点?

Is there any way to do this?

推荐答案

设置这个在布局的XML为您的EditText:

Set this in your layout's xml for your EditText:

安卓inputType =textNoSuggestions

或呼叫 setInputType(InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS)在你的活动

如果您需要支持的API 4及以下,使用安卓inputType =为TextFilter

If you need to support API 4 and below, use android:inputType="textFilter"

阅读全文

相关推荐

最新文章