Search in sources :

Example 1 with PreferenceActivity

use of android.preference.PreferenceActivity in project android_packages_inputmethods_LatinIME by CyanogenMod.

the class UserDictionaryAddWordFragment method onItemSelected.

@Override
public void onItemSelected(final AdapterView<?> parent, final View view, final int pos, final long id) {
    final LocaleRenderer locale = (LocaleRenderer) parent.getItemAtPosition(pos);
    if (locale.isMoreLanguages()) {
        PreferenceActivity preferenceActivity = (PreferenceActivity) getActivity();
        preferenceActivity.startPreferenceFragment(new UserDictionaryLocalePicker(), true);
    } else {
        mContents.updateLocale(locale.getLocaleString());
    }
}
Also used : LocaleRenderer(com.android.inputmethod.latin.userdictionary.UserDictionaryAddWordContents.LocaleRenderer) PreferenceActivity(android.preference.PreferenceActivity)

Aggregations

PreferenceActivity (android.preference.PreferenceActivity)1 LocaleRenderer (com.android.inputmethod.latin.userdictionary.UserDictionaryAddWordContents.LocaleRenderer)1