是否有任何事件可以检测自动建议单词选择(字典)安卓键盘。
下面是我用来检测的代码
noremap n h
noremap e j
noremap i k
noremap o l
noremap h n
noremap j e
noremap k i
noremap l o
noremap N H
noremap E J
noremap I K
noremap O l
noremap H N
noremap J E
noremap K I
noremap L O
答案 0 :(得分:0)
很好,你可以使用这个
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
// On JellyBean & above, you can provide a shortcut and an explicit Locale
UserDictionary.Words.addWord(this, "MadeUpWord", 10, "Mad", Locale.getDefault());
} else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.CUPCAKE) {
UserDictionary.Words.addWord(this, "MadeUpWord", 10, UserDictionary.Words.LOCALE_TYPE_CURRENT);
}