我正在使用一个自定义键盘,如果安装在ICS中需要使用默认字典,我已经检查了模拟器它的问题,但是现在安装在索尼平板电脑S中,SpellCheckerSession总是返回null。
final TextServicesManager tsm = (TextServicesManager) getSystemService(
Context.TEXT_SERVICES_MANAGER_SERVICE);
SpellCheckerSession mScs;
mScs = tsm.newSpellCheckerSession(null, null,new SpellCheckerSessionListener() {
public void onGetSuggestions(final SuggestionsInfo[] arg0) {
final StringBuilder sb = new StringBuilder();
for (int i = 0; i < arg0.length; ++i) {
}
Log.i("OnGetSuggestion","Suggestion Returned :: "+sb.toString());
}
}, true);