android输入法问题
来源:互联网 发布:网络公司员工培训 编辑:程序博客网 时间:2024/05/17 02:54
1 谷歌输入法
包名:com.google.android.inputmethod.latin
属于第三方输入法
LatinIME软键盘
OpenWnn CJK输入法
PinyinIME GOOGLE输入法
2 修改系统默认输入法
打开输入法,点击默认的输入法:例如谷歌输入法。然后adb remount,打开eclipse,查看相应的数据库,导出数据库,查看数据库内容。
frameworks\base\packages\SettingsProvider\res\values\strings_add.xml
<!-- E40_Ewis input method -->
<stringname="jsr_ewis_enabled_input_methods">com.android.inputmethod.latin/.LatinIME:com.google.android.inputmethod.latin/com.android.inputmethod.latin.LatinIME:com.google.android.googlequicksearchbox/com.google.android.voicesearch.ime.VoiceInputMethodService</string>
<stringname="jsr_ewis_default_input_method">com.google.android.inputmethod.latin/com.android.inputmethod.latin.LatinIME</string>
frameworks\base\packages\SettingsProvider\src\com\android\providers\settings\DatabaseHelper.java
loadSecureSettings()方法中:
/*Begin add by liting in 20160122 makedefault input_method for E43_Ewis */
if (JSRConfig.J_E43_Ewis){
loadStringSetting(stmt, Settings.Secure.ENABLED_INPUT_METHODS,
R.string.jsr_ewis_enabled_input_methods);
loadStringSetting(stmt, Settings.Secure.DEFAULT_INPUT_METHOD,
R.string.jsr_ewis_default_input_method);
}
/*End add by liting in 20160122 make defaultinput_method for E43_Ewis */
第二种方式:
在\frameworks\base\services\java\com\android\server的InputMethodManagerService.java文件里面buildInputMethodListLocked()方法添加以下内容:
String defaultIme =
Settings.Secure.getString(mContext.getContentResolver(),Settings.Secure.DEFAULT_INPUT_METHOD);
if(defaultIme== null){
finalResources res = mContext.getResources();
try{
//StringmyIME =
res.getString(com.android.internal.R.string.config_default_input_method1);
StringmyIME = "com.klye.ime.latin/.LatinIME";
if(myIME!=null&&myIME.length()>0){
Settings.Secure.putString(mContext.getContentResolver(),
Settings.Secure.DEFAULT_INPUT_METHOD,myIME);
}
}catch(Exceptione){
}
}
该方法加载输入法列表,读取器用的输入法,如果设置为空,加载全部输入法,并选择一个默认输入法。
3 将Latinime输入法的某“Done”字符变为“OK”
\packages\inputmethods\LatinIME
经分析,所有按键都是画出来的。暂时的修改方法是:
\packages\inputmethods\LatinIME\java\src\com\android\inputmethod\keyboard\KeyboardView.java
//finalString label = key.getLabel();
//beginmodify by liting in 2016-1-28
String keylabel = key.getLabel();
if(("Done").equals(keylabel)){
final String locale = context.getResources().getConfiguration().locale.getCountry();
if(("CZ").equals(locale)){
keylabel = "OK";
}
}
final String label = keylabel;
//end modify by liting in 2016-1-28
com.android.inputmethod.latin/.LatinIME:com.cootek.smartinputv5.oem/com.cootek.smartinput5.TouchPalIME:com.google.android.googlequicksearchbox/com.google.android.voicesearch.ime.VoiceInputMethodService:com.android.inputmethod.pinyin/.PinyinIME:com.klye.ime.latin/.LatinIME
com.android.inputmethod.latin/.LatinIME:com.android.inputmethod.pinyin/.PinyinIME:com.cootek.smartinputv5.oem/com.cootek.smartinput5.TouchPalIME:com.google.android.googlequicksearchbox/com.google.android.voicesearch.ime.VoiceInputMethodService
- android 输入法联想问题
- Android 输入法遮挡问题
- Android 输入法遮挡问题
- 关于android输入法问题
- android输入法问题
- Android中解决输入法问题
- Android 中输入法键盘问题
- android edittext弹出输入法的窗口问题
- Android输入法挤乱布局问题
- android 弹出输入法 及遮挡 相关问题
- 解决android输入法隐藏相关问题所在
- Android输入法挤乱布局问题
- android 解决输入法键盘遮盖布局问题
- android 解决输入法键盘遮盖布局问题
- Android输入法挤乱布局问题
- android 解决输入法键盘遮盖布局问题
- android 解决输入法键盘遮盖布局问题
- Android 输入法弹出框挡住界面问题
- Q351:从字符串1中删除字符串2中出现的字符
- android使状态栏沉浸效果
- 【卷积神经网络】tiny-dnn网络参数
- OC语法基础:NSURLConnection总结
- JDBC连接sql server数据库
- android输入法问题
- JAVA学习代码——输入身份证判断生日
- Oracle分页
- tortoisegit使用
- Android开发之浅谈框架模式MVC
- oracle语句中把一列的值合并为一个值,用逗号隔开
- Visual Studio中如何添加自己的代码段
- GPIO驱动框架
- R ggmap