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

China☆狼群 提交于 2019-12-13 18:12:55

问题


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.



来源:https://stackoverflow.com/questions/48499160/how-to-disable-the-swiftkey-third-party-keyboard-behavior-in-edittext

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!