Include Word Suggestions in Android Keyboard

感情迁移 提交于 2019-11-30 08:50:44

问题


Hi I want to include word suggestions in my custom keyboard.

e.g if I write wi it should suggest me whether you want to write "winner" "winks" "wilson" etc

Please guide me.

Thanks


回答1:


Here is the real answer to this question.

It was hard for me to find:

First you need to:

Add Words to Android's UserDictionary

By having the words in the dictionary, they will show up in suggestions.

If you want to exclusively show your words however, then something like the auto-complete dropdown idea is a better fit (that the other answers linked)




回答2:


You can search for source code for android keyboard that are having this suggestion bars, i.e. download source for android gingerbread 2.3 keyboard source code, as android is opensource you can get the code easily.



来源:https://stackoverflow.com/questions/6107435/include-word-suggestions-in-android-keyboard

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