aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2010-11-23 01:36:33 -0800
committerTadashi G. Takaoka <takaoka@google.com>2010-11-23 09:52:59 -0800
commit4b8bbbadac9276df7ab587a228a84f93d74c5541 (patch)
tree6796e1e3f32e5a782c7458b14472d0fd4425028a /java/src
parenta4448894039566a2889bdf1a6fa574da45e14412 (diff)
downloadlatinime-4b8bbbadac9276df7ab587a228a84f93d74c5541.tar.gz
latinime-4b8bbbadac9276df7ab587a228a84f93d74c5541.tar.xz
latinime-4b8bbbadac9276df7ab587a228a84f93d74c5541.zip
Fix odd "more" key behavior on tablet phone number keyboard
Bug: 3176540 Change-Id: Iaa1f3776d5ac236b2655910ede7522ceac36a9a1
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/latin/KeyboardSwitcher.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/java/src/com/android/inputmethod/latin/KeyboardSwitcher.java b/java/src/com/android/inputmethod/latin/KeyboardSwitcher.java
index f1f8dc27d..790f86138 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);
}