diff --git a/java/res/xml-xlarge/kbd_phone.xml b/java/res/xml-xlarge/kbd_phone.xml index 57575b602396225a0e5787f7c79d800ff7302779..842c74bf5544d8d6634d230e6af6a7c13de57833 100644 --- a/java/res/xml-xlarge/kbd_phone.xml +++ b/java/res/xml-xlarge/kbd_phone.xml @@ -69,7 +69,7 @@ </Row> <Row> <Key - latin:codes="@integer/key_switch_alpha_symbol" + latin:codes="@integer/key_shift" latin:keyLabel="@string/label_more_key" latin:keyLabelOption="fontNormal|alignLeft|alignBottom" latin:isModifier="true" diff --git a/java/res/xml-xlarge/kbd_phone_symbols.xml b/java/res/xml-xlarge/kbd_phone_symbols.xml index fea550414d3347f4f5cf3c2bbe4b7acb2a0abebc..9ba60ed85895b5383ef20b5a30a395e9739aa5d4 100644 --- a/java/res/xml-xlarge/kbd_phone_symbols.xml +++ b/java/res/xml-xlarge/kbd_phone_symbols.xml @@ -73,7 +73,7 @@ </Row> <Row> <Key - latin:codes="@integer/key_switch_alpha_symbol" + latin:codes="@integer/key_shift" latin:keyLabel="@string/label_more_key" latin:keyLabelOption="fontNormal|alignLeft|alignBottom" latin:isModifier="true" diff --git a/java/res/xml/kbd_qwerty_black_symbol.xml b/java/res/xml/kbd_qwerty_black_symbol.xml index 840db9c5a5a90d0d73cdb7388b1cdf7bc43f5b4e..fe6b3a61133a070e91d79cb09257450fa92d476e 100644 --- a/java/res/xml/kbd_qwerty_black_symbol.xml +++ b/java/res/xml/kbd_qwerty_black_symbol.xml @@ -44,7 +44,7 @@ <default> <Key latin:codes="@integer/key_switch_alpha_symbol" - latin:keyLabel="@string/label_symbol_key" + latin:keyLabel="@string/label_to_symbol_key" latin:keyWidth="20%p" latin:isModifier="true" latin:keyEdgeFlags="left" /> @@ -73,7 +73,7 @@ <default> <Key latin:codes="@integer/key_switch_alpha_symbol" - latin:keyLabel="@string/label_symbol_key" + latin:keyLabel="@string/label_to_symbol_key" latin:keyWidth="15%p" latin:isModifier="true" latin:keyEdgeFlags="left" /> diff --git a/java/src/com/android/inputmethod/latin/KeyboardSwitcher.java b/java/src/com/android/inputmethod/latin/KeyboardSwitcher.java index f1f8dc27d661311932ee3225ea5bb1a3bc5555d3..790f86138cc678fc7f544a6dc82dec1b8fdded17 100644 --- a/java/src/com/android/inputmethod/latin/KeyboardSwitcher.java +++ b/java/src/com/android/inputmethod/latin/KeyboardSwitcher.java @@ -142,9 +142,18 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha final boolean voiceKeyEnabled = mVoiceKeyEnabled; final boolean hasVoiceKey = voiceKeyEnabled && !mVoiceButtonOnPrimary; final int imeOptions = mImeOptions; - mSymbolsId = new KeyboardId(locale, orientation, mode, KBD_SYMBOLS, + // Note: This comment is only applied for phone number keyboard layout. + // On non-xlarge device, "@integer/key_switch_alpha_symbol" key code is used to switch + // between "phone keyboard" and "phone symbols keyboard". But on xlarge device, + // "@integer/key_shift" key code is used for that purpose in order to properly display + // "more" and "locked more" key labels. To achieve these behavior, we should initialize + // mSymbolsId and mSymbolsShiftedId to "phone keyboard" and "phone symbols keyboard" + // respectively here for xlarge device's layout switching. + mSymbolsId = new KeyboardId(locale, orientation, mode, + mode == MODE_PHONE ? KBD_PHONE : KBD_SYMBOLS, colorScheme, hasSettingsKey, voiceKeyEnabled, hasVoiceKey, imeOptions, true); - mSymbolsShiftedId = new KeyboardId(locale, orientation, mode, KBD_SYMBOLS_SHIFT, + mSymbolsShiftedId = new KeyboardId(locale, orientation, mode, + mode == MODE_PHONE ? KBD_PHONE_SYMBOLS : KBD_SYMBOLS_SHIFT, colorScheme, hasSettingsKey, voiceKeyEnabled, hasVoiceKey, imeOptions, true); }