如何禁用 EditText 中的 SwiftKey(第三方键盘)行为?

How to disable the SwiftKey (third-party keyboard) behavior in EditText?

我在我的 Android 应用程序中使用标准的 EditText 控件。 此 EditText 的输入只能从应用程序的内置键盘插入。

SwiftKey(第三方键盘应用程序)安装在设备上时,它会导致奇怪的行为,例如跳动的光标,以及某些文本下方的下划线。

我的问题是,如何避免 EditText 控件中的任何第三方键盘效果。

My question is, how can I avoid of any third-party keyboard effects in the EditText control.

你不能。输入法编辑器 ("keyboard app") 的选择取决于用户,而不是您。据我所知,有些设备默认附带 SwiftKey。

在 EditText.InputType 上使用 TYPE_TEXT_FLAG_NO_SUGGESTIONS 标志解决了问题。