1

我正在使用如果安装在 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);
4

0 回答 0