List of usage examples for android.view.inputmethod InputMethodSubtype containsExtraValueKey
public boolean containsExtraValueKey(String key)
From source file:com.mobiletin.inputmethod.indic.LatinIME.java
private boolean checkForTransliteration() { Locale locale = mSubtypeSwitcher.getCurrentSubtypeLocale(); if (!locale.getLanguage().equals("en")) { mInputLogic.setIndic(true);//from ww w. ja v a 2 s . c o m } else { mInputLogic.setIndic(false); } InputMethodSubtype currentSubtype = mSubtypeSwitcher.getCurrentSubtype(); if (currentSubtype.containsExtraValueKey(Constants.Subtype.ExtraValue.TRANSLITERATION_METHOD)) { try { String transliterationName = currentSubtype .getExtraValueOf(Constants.Subtype.ExtraValue.TRANSLITERATION_METHOD); mInputLogic.enableTransliteration(transliterationName, getApplicationContext()); return true; } catch (Exception e) { e.printStackTrace(); throw new RuntimeException(e); } } mInputLogic.disableTransliteration(); return false; }