编辑信息联系人先输入一个联系人按done,再输入一个数字按删除,删除的是之前的联系人
2016-06-20 17:26
441 查看
编辑信息联系人先输入一个联系人按done,再输入一个数字按删除,删除的是之前的联系人
[DESCRIPTION]解决“信息编辑界面,主题为空的情况下,点击虚拟键盘上的DEL键,主题框不会消失”问题后,会出现在messaging-》编辑信息-》添加联系人-》先添加一个联系人-》按done-》输入一个数字-》按删除
删除的是之前的联系人。应删除当前数字。
[SOLUTION]
1:修改LatinIME输入法代码中的LatinIME.JAVA
private void sendKeyCodePoint(final int code) {
...
if (Keyboard.CODE_ENTER == code && mTargetApplicationInfo != null ){// modifiy forALPS01285465
// && mTargetApplicationInfo.targetSdkVersion < 16) { //modifiy forALPS01285465
// Backward compatibility mode. Before Jelly bean, the keyboard would simulate
// a hardware keyboard event on pressing enter or delete. This is bad for many
// reasons (there are race conditions with commits) but some applications are
// relying on this behavior so we continue to support it for older apps.
sendDownUpKeyEventForBackwardCompatibility(KeyEvent.KEYCODE_ENTER);
} else {
final String text = new String(new int[] { code }, 0, 1);
mConnection.commitText(text, text.length());
}
......
再修改
private void handleBackspace(final int spaceState) {
......
if (mTargetApplicationInfo != null ){// modifiy forALPS01285465
//&& mTargetApplicationInfo.targetSdkVersion < 16) {// modifiy forALPS01285465
// Backward compatibility mode. Before Jelly bean, the keyboard would simulate
// a hardware keyboard event on pressing enter or delete. This is bad for many
// reasons (there are race conditions with commits) but some applications are
// relying on this behavior so we continue to support it for older apps.
sendDownUpKeyEventForBackwardCompatibility(KeyEvent.KEYCODE_DEL);
} else {
mConnection.deleteSurroundingText(1, 0);
}
最后修改
private void sendKeyCodePoint(){
......
/*if(code>='0'&&code<='9'){ //将这部分code注释掉
...
}*/
......
}
补充说明:
在新建信息,点击收件人图标添加联系人,信息界面删除收件人,无法删除时,
也可以用上面的方法解决。
相关文章推荐
- jquery实现页面虚拟键盘特效
- 打造个性化的功能强大的Jquery虚拟键盘(VirtualKeyboard)
- android虚拟键盘挡住了输入框处理办法!
- maillist of Hacking USB@LINUX
- MTK驱动笔记
- (zt)MTK编译过程
- 解析MTK获取系统时间函数大全
- MTK中关于存储系统应用教程
- 如何在MTK上使用RVCT
- 手机开发平台指南
- MTK相关
- Java数字签名步骤
- 手机MTK芯片组格式化
- MTK 如何生成lib
- 在大容量数据集中查找前N个数的算法
- MTK中history机制小结
- MTK手机平台添加资源和菜单的方式(转)
- 国笔手机输入法MTK支持的语言
- mtk modis 菜单功能紊乱
- 11a MTK 编译系列问题