Search in sources :

Example 6 with RichInputMethodManager

use of com.android.inputmethod.latin.RichInputMethodManager in project android_packages_inputmethods_LatinIME by CyanogenMod.

the class KeyboardTextsSetTests method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    RichInputMethodManager.init(getContext());
    final RichInputMethodManager richImm = RichInputMethodManager.getInstance();
    final ArrayList<InputMethodSubtype> allSubtypesList = new ArrayList<>();
    final InputMethodInfo imi = richImm.getInputMethodInfoOfThisIme();
    final int subtypeCount = imi.getSubtypeCount();
    for (int index = 0; index < subtypeCount; index++) {
        final InputMethodSubtype subtype = imi.getSubtypeAt(index);
        allSubtypesList.add(subtype);
    }
    mAllSubtypesList = Collections.unmodifiableList(allSubtypesList);
}
Also used : InputMethodSubtype(android.view.inputmethod.InputMethodSubtype) RichInputMethodManager(com.android.inputmethod.latin.RichInputMethodManager) ArrayList(java.util.ArrayList) InputMethodInfo(android.view.inputmethod.InputMethodInfo)

Aggregations

InputMethodSubtype (android.view.inputmethod.InputMethodSubtype)6 RichInputMethodManager (com.android.inputmethod.latin.RichInputMethodManager)6 RunInLocale (com.android.inputmethod.latin.utils.RunInLocale)2 Locale (java.util.Locale)2 InputMethodInfo (android.view.inputmethod.InputMethodInfo)1 ArrayList (java.util.ArrayList)1