diff --git a/java/res/xml-xlarge/kbd_qwerty.xml b/java/res/xml-xlarge/kbd_qwerty.xml index 984d61f10e7dbb1f5d999fea2a9dfb0b7202b2be..740e7f5f2ef956b231fe89de492eb6f3bf9054ea 100644 --- a/java/res/xml-xlarge/kbd_qwerty.xml +++ b/java/res/xml-xlarge/kbd_qwerty.xml @@ -97,7 +97,10 @@ latin:isRepeatable="true" latin:keyEdgeFlags="right" /> </Row> - <Row> + <!-- TODO: We should have new attributes for <Key> to eliminate these excess duplications --> + <Row + latin:keyboardMode="@+id/mode_normal" + > <Key latin:codes="@integer/key_symbol" latin:keyLabel="@string/label_symbol_key" @@ -152,7 +155,461 @@ latin:isModifier="true" latin:keyEdgeFlags="right" /> </Row> - <Row> + <Row + latin:keyboardMode="@+id/mode_url" + > + <Key + latin:codes="@integer/key_symbol" + latin:keyLabel="@string/label_symbol_key" + latin:keyWidth="8.75%p" + latin:isModifier="true" + latin:keyEdgeFlags="left" /> + <Key + latin:keyLabel="a" + latin:popupKeyboard="@xml/kbd_popup_template" + latin:popupCharacters="@string/alternates_for_a" /> + <Key + latin:keyLabel="s" + latin:popupKeyboard="@xml/kbd_popup_template" + latin:popupCharacters="@string/alternates_for_s" /> + <Key + latin:keyLabel="d" + latin:popupKeyboard="@xml/kbd_popup_template" + latin:popupCharacters="@string/alternates_for_d" /> + <Key + latin:keyLabel="f" /> + <Key + latin:keyLabel="g" + latin:popupKeyboard="@xml/kbd_popup_template" + latin:popupCharacters="@string/alternates_for_g" /> + <Key + latin:keyLabel="h" /> + <Key + latin:keyLabel="j" /> + <Key + latin:keyLabel="k" /> + <Key + latin:keyLabel="l" + latin:popupKeyboard="@xml/kbd_popup_template" + latin:popupCharacters="@string/alternates_for_l" /> + <Key + latin:keyLabel=";" + latin:temporaryShiftKeyLabel=":" + latin:keyHintIcon="@drawable/keyboard_hint_colon" + latin:popupKeyboard="@xml/kbd_popup_template" + latin:popupCharacters=":" /> + <Key + latin:keyLabel="\'" + latin:temporaryShiftKeyLabel=""" + latin:keyHintIcon="@drawable/keyboard_hint_quote" + latin:popupKeyboard="@xml/kbd_popup_template" + latin:popupCharacters=""" /> + <Key + latin:codes="@integer/key_return" + latin:keyIcon="@drawable/sym_keyboard_return" + latin:iconPreview="@drawable/sym_keyboard_feedback_return" + latin:keyWidth="8.75%p" + latin:isModifier="true" + latin:keyEdgeFlags="right" /> + </Row> + <Row + latin:keyboardMode="@+id/mode_email" + > + <Key + latin:codes="@integer/key_symbol" + latin:keyLabel="@string/label_symbol_key" + latin:keyWidth="8.75%p" + latin:isModifier="true" + latin:keyEdgeFlags="left" /> + <Key + latin:keyLabel="a" + latin:popupKeyboard="@xml/kbd_popup_template" + latin:popupCharacters="@string/alternates_for_a" /> + <Key + latin:keyLabel="s" + latin:popupKeyboard="@xml/kbd_popup_template" + latin:popupCharacters="@string/alternates_for_s" /> + <Key + latin:keyLabel="d" + latin:popupKeyboard="@xml/kbd_popup_template" + latin:popupCharacters="@string/alternates_for_d" /> + <Key + latin:keyLabel="f" /> + <Key + latin:keyLabel="g" + latin:popupKeyboard="@xml/kbd_popup_template" + latin:popupCharacters="@string/alternates_for_g" /> + <Key + latin:keyLabel="h" /> + <Key + latin:keyLabel="j" /> + <Key + latin:keyLabel="k" /> + <Key + latin:keyLabel="l" + latin:popupKeyboard="@xml/kbd_popup_template" + latin:popupCharacters="@string/alternates_for_l" /> + <Key + latin:keyLabel=";" /> + <Key + latin:keyLabel="\'" + latin:temporaryShiftKeyLabel=""" + latin:keyHintIcon="@drawable/keyboard_hint_quote" + latin:popupKeyboard="@xml/kbd_popup_template" + latin:popupCharacters=""" /> + <Key + latin:codes="@integer/key_return" + latin:keyIcon="@drawable/sym_keyboard_return" + latin:iconPreview="@drawable/sym_keyboard_feedback_return" + latin:keyWidth="8.75%p" + latin:isModifier="true" + latin:keyEdgeFlags="right" /> + </Row> + <Row + latin:keyboardMode="@+id/mode_im" + > + <Key + latin:codes="@integer/key_symbol" + latin:keyLabel="@string/label_symbol_key" + latin:keyWidth="8.75%p" + latin:isModifier="true" + latin:keyEdgeFlags="left" /> + <Key + latin:keyLabel="a" + latin:popupKeyboard="@xml/kbd_popup_template" + latin:popupCharacters="@string/alternates_for_a" /> + <Key + latin:keyLabel="s" + latin:popupKeyboard="@xml/kbd_popup_template" + latin:popupCharacters="@string/alternates_for_s" /> + <Key + latin:keyLabel="d" + latin:popupKeyboard="@xml/kbd_popup_template" + latin:popupCharacters="@string/alternates_for_d" /> + <Key + latin:keyLabel="f" /> + <Key + latin:keyLabel="g" + latin:popupKeyboard="@xml/kbd_popup_template" + latin:popupCharacters="@string/alternates_for_g" /> + <Key + latin:keyLabel="h" /> + <Key + latin:keyLabel="j" /> + <Key + latin:keyLabel="k" /> + <Key + latin:keyLabel="l" + latin:popupKeyboard="@xml/kbd_popup_template" + latin:popupCharacters="@string/alternates_for_l" /> + <Key + latin:keyLabel=";" + latin:temporaryShiftKeyLabel=":" + latin:keyHintIcon="@drawable/keyboard_hint_colon" + latin:popupKeyboard="@xml/kbd_popup_template" + latin:popupCharacters=":" /> + <Key + latin:keyLabel="\'" + latin:temporaryShiftKeyLabel=""" + latin:keyHintIcon="@drawable/keyboard_hint_quote" + latin:popupKeyboard="@xml/kbd_popup_template" + latin:popupCharacters=""" /> + <Key + latin:codes="@integer/key_return" + latin:keyIcon="@drawable/sym_keyboard_return" + latin:iconPreview="@drawable/sym_keyboard_feedback_return" + latin:keyWidth="8.75%p" + latin:isModifier="true" + latin:keyEdgeFlags="right" /> + </Row> + <Row + latin:keyboardMode="@+id/mode_webentry" + > + <Key + latin:codes="@integer/key_symbol" + latin:keyLabel="@string/label_symbol_key" + latin:keyWidth="8.75%p" + latin:isModifier="true" + latin:keyEdgeFlags="left" /> + <Key + latin:keyLabel="a" + latin:popupKeyboard="@xml/kbd_popup_template" + latin:popupCharacters="@string/alternates_for_a" /> + <Key + latin:keyLabel="s" + latin:popupKeyboard="@xml/kbd_popup_template" + latin:popupCharacters="@string/alternates_for_s" /> + <Key + latin:keyLabel="d" + latin:popupKeyboard="@xml/kbd_popup_template" + latin:popupCharacters="@string/alternates_for_d" /> + <Key + latin:keyLabel="f" /> + <Key + latin:keyLabel="g" + latin:popupKeyboard="@xml/kbd_popup_template" + latin:popupCharacters="@string/alternates_for_g" /> + <Key + latin:keyLabel="h" /> + <Key + latin:keyLabel="j" /> + <Key + latin:keyLabel="k" /> + <Key + latin:keyLabel="l" + latin:popupKeyboard="@xml/kbd_popup_template" + latin:popupCharacters="@string/alternates_for_l" /> + <Key + latin:keyLabel=";" + latin:temporaryShiftKeyLabel=":" + latin:keyHintIcon="@drawable/keyboard_hint_colon" + latin:popupKeyboard="@xml/kbd_popup_template" + latin:popupCharacters=":" /> + <Key + latin:keyLabel="\'" + latin:temporaryShiftKeyLabel=""" + latin:keyHintIcon="@drawable/keyboard_hint_quote" + latin:popupKeyboard="@xml/kbd_popup_template" + latin:popupCharacters=""" /> + <Key + latin:codes="@integer/key_return" + latin:keyIcon="@drawable/sym_keyboard_return" + latin:iconPreview="@drawable/sym_keyboard_feedback_return" + latin:keyWidth="8.75%p" + latin:isModifier="true" + latin:keyEdgeFlags="right" /> + </Row> + <Row + latin:keyboardMode="@+id/mode_normal" + > + <Key + latin:codes="@integer/key_shift" + latin:keyIcon="@drawable/sym_keyboard_shift" + latin:iconPreview="@drawable/sym_keyboard_feedback_shift" + latin:keyWidth="12.5%p" + latin:isModifier="true" + latin:isSticky="true" + latin:keyEdgeFlags="left" /> + <Key + latin:keyLabel="z" + latin:popupKeyboard="@xml/kbd_popup_template" + latin:popupCharacters="@string/alternates_for_z" /> + <Key + latin:keyLabel="x" /> + <Key + latin:keyLabel="c" + latin:popupKeyboard="@xml/kbd_popup_template" + latin:popupCharacters="@string/alternates_for_c" /> + <Key + latin:keyLabel="v" + latin:popupKeyboard="@xml/kbd_popup_template" + latin:popupCharacters="@string/alternates_for_v" /> + <Key + latin:keyLabel="b" /> + <Key + latin:keyLabel="n" + latin:popupKeyboard="@xml/kbd_popup_template" + latin:popupCharacters="@string/alternates_for_n" /> + <Key + latin:keyLabel="m" /> + <Key + latin:keyLabel="," + latin:temporaryShiftKeyLabel="*" + latin:keyHintIcon="@drawable/keyboard_hint_star" + latin:popupKeyboard="@xml/kbd_popup_template" + latin:popupCharacters="*" /> + <Key + latin:keyLabel="." + latin:temporaryShiftKeyLabel="!" + latin:keyHintIcon="@drawable/keyboard_hint_exclamation" + latin:popupKeyboard="@xml/kbd_popup_template" + latin:popupCharacters="!" /> + <Key + latin:keyLabel="/" + latin:temporaryShiftKeyLabel="\?" + latin:keyHintIcon="@drawable/keyboard_hint_question" + latin:popupKeyboard="@xml/kbd_popup_template" + latin:popupCharacters="\?" /> + <Key + latin:codes="@integer/key_shift" + latin:keyIcon="@drawable/sym_keyboard_shift" + latin:iconPreview="@drawable/sym_keyboard_feedback_shift" + latin:keyWidth="12.5%p" + latin:isModifier="true" + latin:isSticky="true" + latin:keyEdgeFlags="right" /> + </Row> + <Row + latin:keyboardMode="@+id/mode_url" + > + <Key + latin:codes="@integer/key_shift" + latin:keyIcon="@drawable/sym_keyboard_shift" + latin:iconPreview="@drawable/sym_keyboard_feedback_shift" + latin:keyWidth="12.5%p" + latin:isModifier="true" + latin:isSticky="true" + latin:keyEdgeFlags="left" /> + <Key + latin:keyLabel="z" + latin:popupKeyboard="@xml/kbd_popup_template" + latin:popupCharacters="@string/alternates_for_z" /> + <Key + latin:keyLabel="x" /> + <Key + latin:keyLabel="c" + latin:popupKeyboard="@xml/kbd_popup_template" + latin:popupCharacters="@string/alternates_for_c" /> + <Key + latin:keyLabel="v" + latin:popupKeyboard="@xml/kbd_popup_template" + latin:popupCharacters="@string/alternates_for_v" /> + <Key + latin:keyLabel="b" /> + <Key + latin:keyLabel="n" + latin:popupKeyboard="@xml/kbd_popup_template" + latin:popupCharacters="@string/alternates_for_n" /> + <Key + latin:keyLabel="m" /> + <Key + latin:keyLabel="," + latin:temporaryShiftKeyLabel="*" + latin:keyHintIcon="@drawable/keyboard_hint_star" + latin:popupKeyboard="@xml/kbd_popup_template" + latin:popupCharacters="*" /> + <Key + latin:keyLabel="." + latin:temporaryShiftKeyLabel="!" + latin:keyHintIcon="@drawable/keyboard_hint_exclamation" + latin:popupKeyboard="@xml/kbd_popup_template" + latin:popupCharacters="!" /> + <Key + latin:keyLabel="/" + latin:temporaryShiftKeyLabel="\?" + latin:keyHintIcon="@drawable/keyboard_hint_question" + latin:popupKeyboard="@xml/kbd_popup_template" + latin:popupCharacters="\?" /> + <Key + latin:codes="@integer/key_shift" + latin:keyIcon="@drawable/sym_keyboard_shift" + latin:iconPreview="@drawable/sym_keyboard_feedback_shift" + latin:keyWidth="12.5%p" + latin:isModifier="true" + latin:isSticky="true" + latin:keyEdgeFlags="right" /> + </Row> + <Row + latin:keyboardMode="@+id/mode_email" + > + <Key + latin:codes="@integer/key_shift" + latin:keyIcon="@drawable/sym_keyboard_shift" + latin:iconPreview="@drawable/sym_keyboard_feedback_shift" + latin:keyWidth="12.5%p" + latin:isModifier="true" + latin:isSticky="true" + latin:keyEdgeFlags="left" /> + <Key + latin:keyLabel="z" + latin:popupKeyboard="@xml/kbd_popup_template" + latin:popupCharacters="@string/alternates_for_z" /> + <Key + latin:keyLabel="x" /> + <Key + latin:keyLabel="c" + latin:popupKeyboard="@xml/kbd_popup_template" + latin:popupCharacters="@string/alternates_for_c" /> + <Key + latin:keyLabel="v" + latin:popupKeyboard="@xml/kbd_popup_template" + latin:popupCharacters="@string/alternates_for_v" /> + <Key + latin:keyLabel="b" /> + <Key + latin:keyLabel="n" + latin:popupKeyboard="@xml/kbd_popup_template" + latin:popupCharacters="@string/alternates_for_n" /> + <Key + latin:keyLabel="m" /> + <Key + latin:keyLabel="," /> + <Key + latin:keyLabel="." /> + <Key + latin:keyLabel="\@" /> + <Key + latin:codes="@integer/key_shift" + latin:keyIcon="@drawable/sym_keyboard_shift" + latin:iconPreview="@drawable/sym_keyboard_feedback_shift" + latin:keyWidth="12.5%p" + latin:isModifier="true" + latin:isSticky="true" + latin:keyEdgeFlags="right" /> + </Row> + <Row + latin:keyboardMode="@+id/mode_im" + > + <Key + latin:codes="@integer/key_shift" + latin:keyIcon="@drawable/sym_keyboard_shift" + latin:iconPreview="@drawable/sym_keyboard_feedback_shift" + latin:keyWidth="12.5%p" + latin:isModifier="true" + latin:isSticky="true" + latin:keyEdgeFlags="left" /> + <Key + latin:keyLabel="z" + latin:popupKeyboard="@xml/kbd_popup_template" + latin:popupCharacters="@string/alternates_for_z" /> + <Key + latin:keyLabel="x" /> + <Key + latin:keyLabel="c" + latin:popupKeyboard="@xml/kbd_popup_template" + latin:popupCharacters="@string/alternates_for_c" /> + <Key + latin:keyLabel="v" + latin:popupKeyboard="@xml/kbd_popup_template" + latin:popupCharacters="@string/alternates_for_v" /> + <Key + latin:keyLabel="b" /> + <Key + latin:keyLabel="n" + latin:popupKeyboard="@xml/kbd_popup_template" + latin:popupCharacters="@string/alternates_for_n" /> + <Key + latin:keyLabel="m" /> + <Key + latin:keyLabel="," + latin:temporaryShiftKeyLabel="*" + latin:keyHintIcon="@drawable/keyboard_hint_star" + latin:popupKeyboard="@xml/kbd_popup_template" + latin:popupCharacters="*" /> + <Key + latin:keyLabel="." + latin:temporaryShiftKeyLabel="!" + latin:keyHintIcon="@drawable/keyboard_hint_exclamation" + latin:popupKeyboard="@xml/kbd_popup_template" + latin:popupCharacters="!" /> + <Key + latin:keyLabel="/" + latin:temporaryShiftKeyLabel="\?" + latin:keyHintIcon="@drawable/keyboard_hint_question" + latin:popupKeyboard="@xml/kbd_popup_template" + latin:popupCharacters="\?" /> + <Key + latin:codes="@integer/key_shift" + latin:keyIcon="@drawable/sym_keyboard_shift" + latin:iconPreview="@drawable/sym_keyboard_feedback_shift" + latin:keyWidth="12.5%p" + latin:isModifier="true" + latin:isSticky="true" + latin:keyEdgeFlags="right" /> + </Row> + <Row + latin:keyboardMode="@+id/mode_webentry" + > <Key latin:codes="@integer/key_shift" latin:keyIcon="@drawable/sym_keyboard_shift" @@ -211,7 +668,118 @@ latin:keyEdgeFlags="right" /> </Row> <!-- This row is intentionally not marked as a bottom row --> - <Row> + <Row + latin:keyboardMode="@+id/mode_normal" + > + <Key + latin:keyLabel="(" + latin:temporaryShiftKeyLabel="<" + latin:keyHintIcon="@drawable/keyboard_hint_smaller" + latin:popupKeyboard="@xml/kbd_popup_template" + latin:popupCharacters="<" + latin:horizontalGap="16.25%p" /> + <Key + latin:keyLabel=")" + latin:temporaryShiftKeyLabel=">" + latin:keyHintIcon="@drawable/keyboard_hint_greater" + latin:popupKeyboard="@xml/kbd_popup_template" + latin:popupCharacters=">" /> + <Key + latin:codes="@integer/key_space" + latin:keyIcon="@drawable/sym_keyboard_space" + latin:iconPreview="@drawable/sym_keyboard_feedback_space" + latin:keyWidth="37.5%p" + latin:isModifier="true" /> + <Key + latin:keyLabel="_" + latin:temporaryShiftKeyLabel="\@" + latin:keyHintIcon="@drawable/keyboard_hint_at" + latin:popupKeyboard="@xml/kbd_popup_template" + latin:popupCharacters="\@" /> + <Key + latin:keyLabel="-" + latin:temporaryShiftKeyLabel="#" + latin:keyHintIcon="@drawable/keyboard_hint_doublecross" + latin:popupKeyboard="@xml/kbd_popup_template" + latin:popupCharacters="#" /> + </Row> + <Row + latin:keyboardMode="@+id/mode_url" + > + <Key + latin:keyLabel=".com" + latin:keyOutputText=".com" + latin:keyWidth="15.0%p" + latin:horizontalGap="16.25%p" /> + <Key + latin:codes="@integer/key_space" + latin:keyIcon="@drawable/sym_keyboard_space" + latin:iconPreview="@drawable/sym_keyboard_feedback_space" + latin:keyWidth="37.5%p" + latin:isModifier="true" /> + <Key + latin:keyLabel="_" + latin:temporaryShiftKeyLabel="\@" + latin:keyHintIcon="@drawable/keyboard_hint_at" + latin:popupKeyboard="@xml/kbd_popup_template" + latin:popupCharacters="\@" /> + <Key + latin:keyLabel="-" + latin:temporaryShiftKeyLabel="#" + latin:keyHintIcon="@drawable/keyboard_hint_doublecross" + latin:popupKeyboard="@xml/kbd_popup_template" + latin:popupCharacters="#" /> + </Row> + <Row + latin:keyboardMode="@+id/mode_email" + > + <Key + latin:keyLabel=".com" + latin:keyOutputText=".com" + latin:keyWidth="15.0%p" + latin:horizontalGap="16.25%p" /> + <Key + latin:codes="@integer/key_space" + latin:keyIcon="@drawable/sym_keyboard_space" + latin:iconPreview="@drawable/sym_keyboard_feedback_space" + latin:keyWidth="37.5%p" + latin:isModifier="true" /> + <Key + latin:keyLabel="_" /> + <Key + latin:keyLabel="-" /> + </Row> + <Row + latin:keyboardMode="@+id/mode_im" + > + <Key + latin:keyLabel=":-)" + latin:keyOutputText=":-)" + latin:popupKeyboard="@xml/popup_smileys" + latin:keyWidth="15.0%p" + latin:horizontalGap="16.25%p" /> + <Key + latin:codes="@integer/key_space" + latin:keyIcon="@drawable/sym_keyboard_space" + latin:iconPreview="@drawable/sym_keyboard_feedback_space" + latin:keyWidth="37.5%p" + latin:isModifier="true" /> + <Key + latin:keyLabel="_" + latin:temporaryShiftKeyLabel="\@" + latin:keyHintIcon="@drawable/keyboard_hint_at" + latin:popupKeyboard="@xml/kbd_popup_template" + latin:popupCharacters="\@" /> + <Key + latin:keyLabel="-" + latin:temporaryShiftKeyLabel="#" + latin:keyHintIcon="@drawable/keyboard_hint_doublecross" + latin:popupKeyboard="@xml/kbd_popup_template" + latin:popupCharacters="#" /> + </Row> + <Row + latin:keyboardMode="@+id/mode_webentry" + > <Key latin:keyLabel="(" latin:temporaryShiftKeyLabel="<" diff --git a/java/res/xml-xlarge/popup_smileys.xml b/java/res/xml-xlarge/popup_smileys.xml new file mode 100644 index 0000000000000000000000000000000000000000..cf30a2461f53dde14d7091ad139782e043ca3c31 --- /dev/null +++ b/java/res/xml-xlarge/popup_smileys.xml @@ -0,0 +1,89 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** +** Copyright 2010, The Android Open Source Project +** +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at +** +** http://www.apache.org/licenses/LICENSE-2.0 +** +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and +** limitations under the License. +*/ +--> + +<Keyboard + xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" + latin:keyWidth="7.5%p" + latin:horizontalGap="0px" + latin:verticalGap="0px" + latin:keyHeight="@dimen/key_height" +> + <Row + latin:rowEdgeFlags="top" + > + <Key + latin:keyLabel=":-)" + latin:keyOutputText=":-) " + latin:keyEdgeFlags="left" /> + <Key + latin:keyLabel=":-(" + latin:keyOutputText=":-( " /> + <Key + latin:keyLabel=";-)" + latin:keyOutputText=";-) " /> + <Key + latin:keyLabel=":-P" + latin:keyOutputText=":-P " /> + <Key + latin:keyLabel="=-O" + latin:keyOutputText="=-O " + latin:keyEdgeFlags="right" /> + </Row> + <Row> + <Key + latin:keyLabel=":-*" + latin:keyOutputText=":-* " + latin:keyEdgeFlags="left" /> + <Key + latin:keyLabel=":O" + latin:keyOutputText=":O " /> + <Key + latin:keyLabel="B-)" + latin:keyOutputText="B-) " /> + <Key + latin:keyLabel=":-$" + latin:keyOutputText=":-$ " /> + <Key + latin:keyLabel=":-!" + latin:keyOutputText=":-! " + latin:keyEdgeFlags="right" /> + </Row> + <Row + latin:rowEdgeFlags="bottom" + > + <Key + latin:keyLabel=":-[" + latin:keyOutputText=":-[ " + latin:keyEdgeFlags="left" /> + <Key + latin:keyLabel="O:-)" + latin:keyOutputText="O:-) " /> + <Key + latin:keyLabel=":-\\" + latin:keyOutputText=":-\\ " /> + <Key + latin:keyLabel=":'(" + latin:keyOutputText=":'( " /> + <Key + latin:keyLabel=":-D" + latin:keyOutputText=":-D " + latin:keyEdgeFlags="right" /> + </Row> +</Keyboard> diff --git a/java/src/com/android/inputmethod/latin/LatinKeyboard.java b/java/src/com/android/inputmethod/latin/LatinKeyboard.java index 3fc484d09a4c674ec302fda33758d93de2d9d8c2..11e7ef936eb1c95fc82892a3fbb8e1fa44812fbe 100644 --- a/java/src/com/android/inputmethod/latin/LatinKeyboard.java +++ b/java/src/com/android/inputmethod/latin/LatinKeyboard.java @@ -164,7 +164,7 @@ public class LatinKeyboard extends BaseKeyboard { mEnterKey.popupCharacters = null; mEnterKey.popupResId = 0; mEnterKey.text = null; - switch (options&(EditorInfo.IME_MASK_ACTION|EditorInfo.IME_FLAG_NO_ENTER_ACTION)) { + switch (options & (EditorInfo.IME_MASK_ACTION|EditorInfo.IME_FLAG_NO_ENTER_ACTION)) { case EditorInfo.IME_ACTION_GO: mEnterKey.iconPreview = null; mEnterKey.icon = null; @@ -193,19 +193,11 @@ public class LatinKeyboard extends BaseKeyboard { mEnterKey.label = res.getText(R.string.label_send_key); break; default: - if (mode == KeyboardSwitcher.MODE_IM) { - mEnterKey.icon = null; - mEnterKey.iconPreview = null; - mEnterKey.label = ":-)"; - mEnterKey.text = ":-) "; - mEnterKey.popupResId = R.xml.popup_smileys; - } else { - mEnterKey.iconPreview = res.getDrawable( - R.drawable.sym_keyboard_feedback_return); - mEnterKey.icon = res.getDrawable(mIsBlackSym ? - R.drawable.sym_bkeyboard_return : R.drawable.sym_keyboard_return); - mEnterKey.label = null; - } + mEnterKey.iconPreview = res.getDrawable( + R.drawable.sym_keyboard_feedback_return); + mEnterKey.icon = res.getDrawable(mIsBlackSym ? + R.drawable.sym_bkeyboard_return : R.drawable.sym_keyboard_return); + mEnterKey.label = null; break; } // Set the initial size of the preview icon