How to disable the SwiftKey (third-party keyboard)

2019-07-27 23:10发布

问题:

I'm using the standard EditText control in my Android app. The input for this EditText should be inserted only from the built-in Keypad of the app.

When SwiftKey (third-party keyboard app) is installed on the device, it causing to strange behavior like a jumpy cursor, and underline below some text.

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

回答1:

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

You can't. The choice of the input method editor ("keyboard app") is up to the user, not you. AFAIK, there are some devices that ship with SwiftKey as the default.



回答2:

Using TYPE_TEXT_FLAG_NO_SUGGESTIONS flag on EditText.InputType solved the issue.