问题描述
我如何检测的语言是利用输入到的EditText。我知道API 13具有<$c$c>getCurrentInputMethodSubtype$c$c>,但什么是替代旧版本?
How can I detect which language is use typing into EditText. I know the API 13 has getCurrentInputMethodSubtype
, but what is the alternate for older versions?
推荐答案
有没有。而且我不会指望甚至高于在所有的键盘工作。我写了一个流行的键盘和不知道在哪里的框架将得到这些信息从 - 没有API,让他们查询哪些键盘类型,我们还是为我们更新,如果我们在键盘切换语言快捷键使用切换(比如从用户)。
There is none. And I wouldn't count on even that above working across all keyboards. I wrote a popular keyboard and have no idea where the framework would get that info from- there's no API for them to query what keyboard type we are or for us to update if we switched (say from a user using an in keyboard switch language shortcut).
键盘API真的是谷歌的私生子继子女。他们似乎并没有把很多心思呢,还是与其他主要的键盘制造商增加新的功能时也会起作用。
The keyboard API is really Google's bastard stepchild. They don't seem to put a lot of thought into it, or work with other major keyboard makers when adding new functionality.
这篇关于检测的Android键盘输入法语言的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!