Skip to content
Snippets Groups Projects
Commit a963d0b2 authored by Tadashi G. Takaoka's avatar Tadashi G. Takaoka Committed by Android (Google) Code Review
Browse files

Merge "Fix odd "more" key behavior on tablet phone number keyboard"

parents da64719c 4b8bbbad
No related branches found
No related tags found
No related merge requests found
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
</Row> </Row>
<Row> <Row>
<Key <Key
latin:codes="@integer/key_switch_alpha_symbol" latin:codes="@integer/key_shift"
latin:keyLabel="@string/label_more_key" latin:keyLabel="@string/label_more_key"
latin:keyLabelOption="fontNormal|alignLeft|alignBottom" latin:keyLabelOption="fontNormal|alignLeft|alignBottom"
latin:isModifier="true" latin:isModifier="true"
......
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
</Row> </Row>
<Row> <Row>
<Key <Key
latin:codes="@integer/key_switch_alpha_symbol" latin:codes="@integer/key_shift"
latin:keyLabel="@string/label_more_key" latin:keyLabel="@string/label_more_key"
latin:keyLabelOption="fontNormal|alignLeft|alignBottom" latin:keyLabelOption="fontNormal|alignLeft|alignBottom"
latin:isModifier="true" latin:isModifier="true"
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
<default> <default>
<Key <Key
latin:codes="@integer/key_switch_alpha_symbol" 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:keyWidth="20%p"
latin:isModifier="true" latin:isModifier="true"
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
<default> <default>
<Key <Key
latin:codes="@integer/key_switch_alpha_symbol" 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:keyWidth="15%p"
latin:isModifier="true" latin:isModifier="true"
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
......
...@@ -142,9 +142,18 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha ...@@ -142,9 +142,18 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha
final boolean voiceKeyEnabled = mVoiceKeyEnabled; final boolean voiceKeyEnabled = mVoiceKeyEnabled;
final boolean hasVoiceKey = voiceKeyEnabled && !mVoiceButtonOnPrimary; final boolean hasVoiceKey = voiceKeyEnabled && !mVoiceButtonOnPrimary;
final int imeOptions = mImeOptions; 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); 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); colorScheme, hasSettingsKey, voiceKeyEnabled, hasVoiceKey, imeOptions, true);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment