android 输入法软键盘屏蔽掉中文切换
来源:互联网 发布:如何手机投诉淘宝卖家 编辑:程序博客网 时间:2024/06/02 01:27
android4.4.2屏蔽掉输入法的中文情节,
直接上路子:
diff --git a/packages/inputmethods/PinyinIME/res/xml/skb_sym2.xml b/packages/inputmethods/Pinyi
nIME/res/xml/skb_sym2.xml
index a55f91e..e0bdefd 100644
--- a/packages/inputmethods/PinyinIME/res/xml/skb_sym2.xml
+++ b/packages/inputmethods/PinyinIME/res/xml/skb_sym2.xml
@@ -55,7 +55,8 @@
<row width="14.696%p" key_type="1">
<key code="-2" label="中 符" width="20%p" repeat="true">
- <toggle_state state_id="@string/toggle_en_sym2" label="英 符" code="-2"/>
+ <!--toggle_state state_id="@string/toggle_en_sym2" label="英 符" code="-2"-->
+ <toggle_state state_id="@string/toggle_en_sym2" label="En" code="-2"/>
</key>
<key code="-3" key_type="3" label="\?123"/>
<key code="62" key_type="5" width="30.608%p"/>
diff --git a/packages/inputmethods/PinyinIME/src/com/android/inputmethod/pinyin/SoftKeyboard.ja
va b/packages/inputmethods/PinyinIME/src/com/android/inputmethod/pinyin/SoftKeyboard.java
index b8cc504..21c2fa0 100644
--- a/packages/inputmethods/PinyinIME/src/com/android/inputmethod/pinyin/SoftKeyboard.java
+++ b/packages/inputmethods/PinyinIME/src/com/android/inputmethod/pinyin/SoftKeyboard.java
@@ -86,6 +86,10 @@ public class SoftKeyboard {
*/
private List<KeyRow> mKeyRows;
+ //vinci add for ignore switching btn
+ private int switchRow = 2;
+ private int switchNum = 0;
+
/**
* Background of the soft keyboard. If it is null, the one in the soft
* keyboard template will be used.
@@ -316,7 +320,10 @@ public class SoftKeyboard {
SoftKey sKey = softKeys.get(i);
if (sKey.mLeft <= x && sKey.mTop <= y && sKey.mRight > x
&& sKey.mBottom > y) {
- return sKey;
+ if (switchRow < row && switchNum == i)
+ return null;
+ else
+ return sKey;
}
}
}
@@ -341,6 +348,8 @@ public class SoftKeyboard {
if (dis < nearestDis) {
nearestDis = dis;
nearestKey = sKey;
+ if (switchRow < row && switchNum == i)
+ return null;
}
}
}
--- a/packages/inputmethods/PinyinIME/src/com/android/inputmethod/pinyin/InputModeSwitcher.java
+++ b/packages/inputmethods/PinyinIME/src/com/android/inputmethod/pinyin/InputModeSwitcher.java
@@ -139,17 +139,17 @@ public class InputModeSwitcher {
/**
* Mode for inputing Chinese with soft keyboard.
*/
- public static final int MODE_SKB_CHINESE = (MASK_SKB_LAYOUT_QWERTY | MASK_LANGUAGE_CN);
+ public static final int MODE_SKB_CHINESE = (MASK_SKB_LAYOUT_QWERTY | MASK_LANGUAGE_EN);
/**
* Mode for inputing basic symbols for Chinese mode with soft keyboard.
*/
- public static final int MODE_SKB_SYMBOL1_CN = (MASK_SKB_LAYOUT_SYMBOL1 | MASK_LANGUAGE_CN)
;
+ public static final int MODE_SKB_SYMBOL1_CN = (MASK_SKB_LAYOUT_SYMBOL1 | MASK_LANGUAGE_EN)
;
/**
* Mode for inputing more symbols for Chinese mode with soft keyboard.
*/
- public static final int MODE_SKB_SYMBOL2_CN = (MASK_SKB_LAYOUT_SYMBOL2 | MASK_LANGUAGE_CN);
+ public static final int MODE_SKB_SYMBOL2_CN = (MASK_SKB_LAYOUT_SYMBOL2 | MASK_LANGUAGE_EN);
/**
* Mode for inputing English lower characters with soft keyboard.
@@ -191,7 +191,7 @@ public class InputModeSwitcher {
/**
* Mode for inputing Chinese with a hardware keyboard.
*/
- public static final int MODE_HKB_CHINESE = (MASK_LANGUAGE_CN);
+ public static final int MODE_HKB_CHINESE = (MASK_LANGUAGE_EN);
/**
* Mode for inputing English with a hardware keyboard
具体实现原理就是屏蔽掉左下角切换button,不再赘述。
- android 输入法软键盘屏蔽掉中文切换
- android Edittext 输入法软键盘屏蔽,有光标
- Android Edittext 输入法软键盘屏蔽,有光标
- 屏蔽android软键盘
- android屏蔽软键盘
- android EditText 屏蔽软键盘
- Android屏蔽EditText软键盘
- Android模拟器切换中文输入法
- android自定义软键盘-中文与英文大小切换
- android隐藏输入法软键盘
- delphi 屏蔽中文输入法
- QLineEdit屏蔽中文输入法
- Android中自定义可以选择中文的NumberPicker屏蔽弹出软键盘
- Android屏蔽EditText的软键盘
- Android屏蔽EditText的软键盘
- android中屏蔽软键盘的方法
- android屏蔽软键盘并且显示光标
- android屏蔽软键盘并且显示光标
- SDI-GS2971
- Java中的线程
- 倒数的循环节
- 手把手教你如何从数据入手判断渠道刷量造假作弊(真实图例)
- C语言之---mommove函数的研究
- android 输入法软键盘屏蔽掉中文切换
- SpringMVC配置详解(简)
- bzoj 3780: 数字统计 (数位dp)
- Android命令Monkey压力测试
- Http Status 304响应状态的资源更新机制
- 在ubuntu16.04下redis-cluster启动问题
- Iterated Local Search算法探索【编辑中....】
- 二次“素数生成”多项式
- 安装ubuntu 14.04