LatinIMESettings.java 文件源码

java
阅读 28 收藏 0 点赞 0 评论 0

项目:hackerskeyboard 作者:
@Override
protected void onResume() {
    super.onResume();
    int autoTextSize = AutoText.getSize(getListView());
    if (autoTextSize < 1) {
        ((PreferenceGroup) findPreference(PREDICTION_SETTINGS_KEY))
                .removePreference(mQuickFixes);
    }

    Log.i(TAG, "compactModeEnabled=" + LatinIME.sKeyboardSettings.compactModeEnabled);
    if (!LatinIME.sKeyboardSettings.compactModeEnabled) {
        CharSequence[] oldEntries = mKeyboardModePortraitPreference.getEntries();
        CharSequence[] oldValues = mKeyboardModePortraitPreference.getEntryValues();

        if (oldEntries.length > 2) {
            CharSequence[] newEntries = new CharSequence[] { oldEntries[0], oldEntries[2] };
            CharSequence[] newValues = new CharSequence[] { oldValues[0], oldValues[2] };
            mKeyboardModePortraitPreference.setEntries(newEntries);
            mKeyboardModePortraitPreference.setEntryValues(newValues);
            mKeyboardModeLandscapePreference.setEntries(newEntries);
            mKeyboardModeLandscapePreference.setEntryValues(newValues);
        }
    }

    updateSummaries();
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号