1、lastInputMethodId = com.android.inputmethod.latin/.LatinIME com.sohu.inputmethod.sogou/.SogouIME
1.1、InputMethodInfo :InputMethodInfo{com.sohu.inputmethod.sogou/.SogouIME, settings: com.sohu.inputmethod.sogou.SogouIMESettingsLauncher}
2、lastInputMethodSubtypeId = 0;
3、mMethodMap
[com.android.inputmethod.pinyin/.PinyinIME=InputMethodInfo{com.android.inputmethod.pinyin/.PinyinIME, settings: com.android.inputmethod.pinyin.SettingsActivity},
com.android.inputmethod.latin/.LatinIME=InputMethodInfo{com.android.inputmethod.latin/.LatinIME, settings: com.android.inputmethod.latin.settings.SettingsActivity},
jp.co.omronsoft.openwnn/.OpenWnnJAJP=InputMethodInfo{jp.co.omronsoft.openwnn/.OpenWnnJAJP, settings: jp.co.omronsoft.openwnn.OpenWnnControlPanelJAJP}]
4、mEnabledInputMethodsStrCache = Settings.Secure.getStringForUser(
mResolver, Settings.Secure.ENABLED_INPUT_METHODS, mCurrentUserId);
com.android.inputmethod.pinyin/.PinyinIME:com.android.inputmethod.latin/.LatinIME:jp.co.omronsoft.openwnn/.OpenWnnJAJP
5、截取字符串
private final TextUtils.SimpleStringSplitter mInputMethodSplitter =
new TextUtils.SimpleStringSplitter(INPUT_METHOD_SEPARATER);
mInputMethodSplitter.setString(enabledInputMethodsStr);
while (mInputMethodSplitter.hasNext()) {}
6、mSettings.getEnabledInputMethodListLocked()
7、final String systemLocale = res.getConfiguration().locale.toString(); 【zh_CN】
8、mTargetSdkVersion = context.getApplicationInfo().targetSdkVersion;
9、mIsSystemIme = InputMethodUtils.isSystemIme(imi);
10、mCollator = Collator.getInstance(fragment.getResources().getConfiguration().locale);
1.1、InputMethodInfo :InputMethodInfo{com.sohu.inputmethod.sogou/.SogouIME, settings: com.sohu.inputmethod.sogou.SogouIMESettingsLauncher}
2、lastInputMethodSubtypeId = 0;
3、mMethodMap
[com.android.inputmethod.pinyin/.PinyinIME=InputMethodInfo{com.android.inputmethod.pinyin/.PinyinIME, settings: com.android.inputmethod.pinyin.SettingsActivity},
com.android.inputmethod.latin/.LatinIME=InputMethodInfo{com.android.inputmethod.latin/.LatinIME, settings: com.android.inputmethod.latin.settings.SettingsActivity},
jp.co.omronsoft.openwnn/.OpenWnnJAJP=InputMethodInfo{jp.co.omronsoft.openwnn/.OpenWnnJAJP, settings: jp.co.omronsoft.openwnn.OpenWnnControlPanelJAJP}]
4、mEnabledInputMethodsStrCache = Settings.Secure.getStringForUser(
mResolver, Settings.Secure.ENABLED_INPUT_METHODS, mCurrentUserId);
com.android.inputmethod.pinyin/.PinyinIME:com.android.inputmethod.latin/.LatinIME:jp.co.omronsoft.openwnn/.OpenWnnJAJP
5、截取字符串
private final TextUtils.SimpleStringSplitter mInputMethodSplitter =
new TextUtils.SimpleStringSplitter(INPUT_METHOD_SEPARATER);
mInputMethodSplitter.setString(enabledInputMethodsStr);
while (mInputMethodSplitter.hasNext()) {}
6、mSettings.getEnabledInputMethodListLocked()
7、final String systemLocale = res.getConfiguration().locale.toString(); 【zh_CN】
8、mTargetSdkVersion = context.getApplicationInfo().targetSdkVersion;
9、mIsSystemIme = InputMethodUtils.isSystemIme(imi);
10、mCollator = Collator.getInstance(fragment.getResources().getConfiguration().locale);
和locale相关的字符比较器
11、设置文字选中
Selection.setSelection((Spannable) tmp, 0, tmp.length());