TextServicesManager无法在索尼平板电脑上工作

时间:2012-06-11 10:37:33

标签: android android-4.0-ice-cream-sandwich

我正在使用一个自定义键盘,如果安装在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);

0 个答案:

没有答案