[html
DESCRIPTION]Current status: 使用android 自帶輸入法,切換到西班牙語,進入編輯短信息界面,彈出鍵盤輸入框,空格按鍵上顯示當前的語言(Espanol)我司但願改變空格按鍵的顯示,不顯示當前語言,而是顯示空格.java
[SOLUTION]android
JB版本修改方式:canvas
1:修改MainKeyboardView.java (alps\packages\inputmethods\latinime\java\src\com\android\inputmethod\keyboard)
中drawSpacebar函數,將繪製語言text的部分註釋掉.ide
//canvas.drawText(language, width / 2, baseline - descent - 1, paint);
paint.setColor(mSpacebarTextColor);
paint.setAlpha(mLanguageOnSpacebarAnimAlpha);
//canvas.drawText(language, width / 2, baseline - descent, paint);函數
2:修改
Key_styles_common.xml
(alps\packages\inputmethods\latinime\java\res\xml)
中spaceKeyStyle的實現爲
<key-style
latin:styleName="spaceKeyStyle"
latin:keyIcon="!icon/space_key"
latin:code="!code/key_space"
latin:keyActionFlags="noKeyPreview|enableLongPress" />spa
3:修改Keyboard-icons-ics.xml (alps\packages\inputmethods\latinime\java\res\values)中 iconSpaceKey的實現爲
<item name="iconSpaceKey">@drawable/sym_keyboard_space_holo</item>code
從新編譯LatinIME後並push到手機替換驗證.L版本和M版本修改方式:orm
1:修改MainKeyboardView.java (alps\packages\inputmethods\latinime\java\src\com\android\inputmethod\keyboard)
中函數drawLanguageOnSpacebar函數, 將繪製語言text的部分註釋掉。xml
paint.setColor(mLanguageOnSpacebarTextColor);
paint.setAlpha(mLanguageOnSpacebarAnimAlpha);
//canvas.drawText(language, width / 2, baseline - descent, paint);
paint.clearShadowLayer();
paint.setTextScaleX(1.0f);
二、從新編譯LatinIME後並push到手機替換驗證.