diff options
Diffstat (limited to 'java/res')
-rw-r--r-- | java/res/values-xlarge/bools.xml | 1 | ||||
-rw-r--r-- | java/res/values/attrs.xml | 5 | ||||
-rw-r--r-- | java/res/values/bools.xml | 1 | ||||
-rw-r--r-- | java/res/values/keycodes.xml | 1 | ||||
-rw-r--r-- | java/res/xml/kbd_qwerty_black_f1.xml | 62 | ||||
-rw-r--r-- | java/res/xml/kbd_qwerty_black_row4.xml | 26 | ||||
-rw-r--r-- | java/res/xml/kbd_qwerty_black_symbol.xml | 84 | ||||
-rw-r--r-- | java/res/xml/kbd_qwerty_f1.xml | 62 | ||||
-rw-r--r-- | java/res/xml/kbd_qwerty_row4.xml | 32 | ||||
-rw-r--r-- | java/res/xml/kbd_qwerty_symbol.xml | 84 | ||||
-rw-r--r-- | java/res/xml/kbd_symbols_black_f1.xml | 46 | ||||
-rw-r--r-- | java/res/xml/kbd_symbols_black_row4.xml | 12 | ||||
-rw-r--r-- | java/res/xml/kbd_symbols_f1.xml | 46 | ||||
-rw-r--r-- | java/res/xml/kbd_symbols_row4.xml | 14 | ||||
-rw-r--r-- | java/res/xml/kbd_symbols_shift_black_row4.xml | 4 | ||||
-rw-r--r-- | java/res/xml/kbd_symbols_shift_row4.xml | 4 |
16 files changed, 424 insertions, 60 deletions
diff --git a/java/res/values-xlarge/bools.xml b/java/res/values-xlarge/bools.xml index 2ac5fc624..3079133dd 100644 --- a/java/res/values-xlarge/bools.xml +++ b/java/res/values-xlarge/bools.xml @@ -22,5 +22,4 @@ <bool name="default_popup_preview">false</bool> <bool name="config_enable_show_settings_key_option">false</bool> <bool name="config_dynamic_key_top_enter_key">false</bool> - <bool name="config_dynamic_key_top_symbol_key">false</bool> </resources> diff --git a/java/res/values/attrs.xml b/java/res/values/attrs.xml index 208711504..7de41f0a0 100644 --- a/java/res/values/attrs.xml +++ b/java/res/values/attrs.xml @@ -149,7 +149,8 @@ <enum name="web" value="4" /> <enum name="phone" value="5" /> </attr> - <attr name="settingsKey" format="string" /> - <attr name="voiceKey" format="string" /> + <attr name="hasSettingsKey" format="string" /> + <attr name="voiceKeyEnabled" format="string" /> + <attr name="hasVoiceKey" format="string" /> </declare-styleable> </resources> diff --git a/java/res/values/bools.xml b/java/res/values/bools.xml index 0497a6aed..5d932a693 100644 --- a/java/res/values/bools.xml +++ b/java/res/values/bools.xml @@ -32,5 +32,4 @@ <bool name="config_long_press_comma_for_settings_enabled">true</bool> <bool name="config_enable_show_settings_key_option">true</bool> <bool name="config_dynamic_key_top_enter_key">true</bool> - <bool name="config_dynamic_key_top_symbol_key">true</bool> </resources> diff --git a/java/res/values/keycodes.xml b/java/res/values/keycodes.xml index c5d5b3cd1..cbfe89690 100644 --- a/java/res/values/keycodes.xml +++ b/java/res/values/keycodes.xml @@ -28,5 +28,4 @@ <!-- Keycode for F1 (function) key. This one switches between language switch & comma/.com --> <integer name="key_settings">-100</integer> <integer name="key_voice">-102</integer> - <integer name="key_f1">-103</integer> </resources> diff --git a/java/res/xml/kbd_qwerty_black_f1.xml b/java/res/xml/kbd_qwerty_black_f1.xml new file mode 100644 index 000000000..296d8a06a --- /dev/null +++ b/java/res/xml/kbd_qwerty_black_f1.xml @@ -0,0 +1,62 @@ +<?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. +*/ +--> + +<merge + xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" +> + <switch> + <case + latin:mode="url" + > + <Key + latin:keyLabel="/" + latin:popupKeyboard="@xml/popup_slash" + latin:keyHintIcon="@drawable/hint_popup" + latin:isModifier="true" /> + </case> + <case + latin:mode="email" + > + <Key + latin:keyLabel="\@" + latin:popupKeyboard="@xml/popup_at" + latin:keyHintIcon="@drawable/hint_popup" + latin:isModifier="true" /> + </case> + <case + latin:hasVoiceKey="true" + > + <Key + latin:codes="@integer/key_voice" + latin:popupKeyboard="@xml/popup_mic" + latin:keyIcon="@drawable/sym_bkeyboard_mic" + latin:iconPreview="@drawable/sym_keyboard_feedback_mic" + latin:keyHintIcon="@drawable/hint_popup" + latin:isModifier="true" /> + </case> + <default> + <Key + latin:keyLabel="," + latin:popupKeyboard="@xml/popup_comma" + latin:keyHintIcon="@drawable/hint_popup" + latin:isModifier="true" /> + </default> + </switch> +</merge> diff --git a/java/res/xml/kbd_qwerty_black_row4.xml b/java/res/xml/kbd_qwerty_black_row4.xml index 2b9ef7f90..c6e25b444 100644 --- a/java/res/xml/kbd_qwerty_black_row4.xml +++ b/java/res/xml/kbd_qwerty_black_row4.xml @@ -27,15 +27,12 @@ > <switch> <case - latin:settingsKey="false" + latin:hasSettingsKey="false" > - <Key - latin:codes="@integer/key_symbol" - latin:keyLabel="@string/label_symbol_key" - latin:keyWidth="20%p" - latin:keyEdgeFlags="left" /> - <Key - latin:codes="@integer/key_f1" /> + <include + latin:keyboardLayout="@xml/kbd_qwerty_black_symbol" /> + <include + latin:keyboardLayout="@xml/kbd_qwerty_black_f1" /> <switch> <case latin:mode="web" @@ -86,19 +83,16 @@ </switch> </case> <case - latin:settingsKey="true" + latin:hasSettingsKey="true" > - <Key - latin:codes="@integer/key_symbol" - latin:keyLabel="@string/label_symbol_key" - latin:keyWidth="15%p" - latin:keyEdgeFlags="left" /> + <include + latin:keyboardLayout="@xml/kbd_qwerty_black_symbol" /> <Key latin:codes="@integer/key_settings" latin:keyIcon="@drawable/sym_bkeyboard_settings" latin:iconPreview="@drawable/sym_keyboard_feedback_settings" /> - <Key - latin:codes="@integer/key_f1" /> + <include + latin:keyboardLayout="@xml/kbd_qwerty_black_f1" /> <switch> <case latin:mode="web" diff --git a/java/res/xml/kbd_qwerty_black_symbol.xml b/java/res/xml/kbd_qwerty_black_symbol.xml new file mode 100644 index 000000000..c1ef170f9 --- /dev/null +++ b/java/res/xml/kbd_qwerty_black_symbol.xml @@ -0,0 +1,84 @@ +<?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. +*/ +--> + +<merge + xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" +> + <switch> + <case + latin:hasSettingsKey="false" + > + <switch> + <!-- When this qwerty keyboard has no voice key but voice key is enabled, then + symbol keyboard will have mic key. That means we should use "?123mic" key here. + --> + <case + latin:voiceKeyEnabled="true" + latin:hasVoiceKey="false" + > + <Key + latin:codes="@integer/key_symbol" + latin:keyIcon="@drawable/sym_bkeyboard_123_mic" + latin:iconPreview="@drawable/sym_keyboard_feedback_123_mic" + latin:keyWidth="20%p" + latin:isModifier="true" + latin:keyEdgeFlags="left" /> + </case> + <default> + <Key + latin:codes="@integer/key_symbol" + latin:keyLabel="@string/label_symbol_key" + latin:keyWidth="20%p" + latin:isModifier="true" + latin:keyEdgeFlags="left" /> + </default> + </switch> + </case> + <case + latin:hasSettingsKey="true" + > + <switch> + <!-- When this qwerty keyboard has no voice key but voice key is enabled, then + symbol keyboard will have mic key. That means we should use "?123mic" key here. + --> + <case + latin:voiceKeyEnabled="true" + latin:hasVoiceKey="false" + > + <Key + latin:codes="@integer/key_symbol" + latin:keyIcon="@drawable/sym_bkeyboard_123_mic" + latin:iconPreview="@drawable/sym_keyboard_feedback_123_mic" + latin:keyWidth="15%p" + latin:isModifier="true" + latin:keyEdgeFlags="left" /> + </case> + <default> + <Key + latin:codes="@integer/key_symbol" + latin:keyLabel="@string/label_symbol_key" + latin:keyWidth="15%p" + latin:isModifier="true" + latin:keyEdgeFlags="left" /> + </default> + </switch> + </case> + </switch> +</merge> diff --git a/java/res/xml/kbd_qwerty_f1.xml b/java/res/xml/kbd_qwerty_f1.xml new file mode 100644 index 000000000..23e494cc5 --- /dev/null +++ b/java/res/xml/kbd_qwerty_f1.xml @@ -0,0 +1,62 @@ +<?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. +*/ +--> + +<merge + xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" +> + <switch> + <case + latin:mode="url" + > + <Key + latin:keyLabel="/" + latin:popupKeyboard="@xml/popup_slash" + latin:keyHintIcon="@drawable/hint_popup" + latin:isModifier="true" /> + </case> + <case + latin:mode="email" + > + <Key + latin:keyLabel="\@" + latin:popupKeyboard="@xml/popup_at" + latin:keyHintIcon="@drawable/hint_popup" + latin:isModifier="true" /> + </case> + <case + latin:hasVoiceKey="true" + > + <Key + latin:codes="@integer/key_voice" + latin:popupKeyboard="@xml/popup_mic" + latin:keyIcon="@drawable/sym_keyboard_mic" + latin:iconPreview="@drawable/sym_keyboard_feedback_mic" + latin:keyHintIcon="@drawable/hint_popup" + latin:isModifier="true" /> + </case> + <default> + <Key + latin:keyLabel="," + latin:popupKeyboard="@xml/popup_comma" + latin:keyHintIcon="@drawable/hint_popup" + latin:isModifier="true" /> + </default> + </switch> +</merge> diff --git a/java/res/xml/kbd_qwerty_row4.xml b/java/res/xml/kbd_qwerty_row4.xml index 2e2b32e3f..a5113ea76 100644 --- a/java/res/xml/kbd_qwerty_row4.xml +++ b/java/res/xml/kbd_qwerty_row4.xml @@ -27,17 +27,12 @@ > <switch> <case - latin:settingsKey="false" + latin:hasSettingsKey="false" > - <Key - latin:codes="@integer/key_symbol" - latin:keyLabel="@string/label_symbol_key" - latin:keyWidth="20%p" - latin:isModifier="true" - latin:keyEdgeFlags="left" /> - <Key - latin:codes="@integer/key_f1" - latin:isModifier="true" /> + <include + latin:keyboardLayout="@xml/kbd_qwerty_symbol" /> + <include + latin:keyboardLayout="@xml/kbd_qwerty_f1" /> <switch> <case latin:mode="web" @@ -94,22 +89,17 @@ </switch> </case> <case - latin:settingsKey="true" + latin:hasSettingsKey="true" > - <Key - latin:codes="@integer/key_symbol" - latin:keyLabel="@string/label_symbol_key" - latin:keyWidth="15%p" - latin:isModifier="true" - latin:keyEdgeFlags="left" /> + <include + latin:keyboardLayout="@xml/kbd_qwerty_symbol" /> <Key latin:codes="@integer/key_settings" latin:keyIcon="@drawable/sym_keyboard_settings" latin:iconPreview="@drawable/sym_keyboard_feedback_settings" latin:isModifier="true" /> - <Key - latin:codes="@integer/key_f1" - latin:isModifier="true" /> + <include + latin:keyboardLayout="@xml/kbd_qwerty_f1" /> <switch> <case latin:mode="web" @@ -163,7 +153,7 @@ latin:keyWidth="15%p" latin:isModifier="true" latin:keyEdgeFlags="right" /> - </case> + </case> <default> <Key latin:codes="@integer/key_return" diff --git a/java/res/xml/kbd_qwerty_symbol.xml b/java/res/xml/kbd_qwerty_symbol.xml new file mode 100644 index 000000000..e90091c36 --- /dev/null +++ b/java/res/xml/kbd_qwerty_symbol.xml @@ -0,0 +1,84 @@ +<?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. +*/ +--> + +<merge + xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" +> + <switch> + <case + latin:hasSettingsKey="false" + > + <switch> + <!-- When this qwerty keyboard has no voice key but voice key is enabled, then + symbol keyboard will have mic key. That means we should use "?123mic" key here. + --> + <case + latin:voiceKeyEnabled="true" + latin:hasVoiceKey="false" + > + <Key + latin:codes="@integer/key_symbol" + latin:keyIcon="@drawable/sym_keyboard_123_mic" + latin:iconPreview="@drawable/sym_keyboard_feedback_123_mic" + latin:keyWidth="20%p" + latin:isModifier="true" + latin:keyEdgeFlags="left" /> + </case> + <default> + <Key + latin:codes="@integer/key_symbol" + latin:keyLabel="@string/label_symbol_key" + latin:keyWidth="20%p" + latin:isModifier="true" + latin:keyEdgeFlags="left" /> + </default> + </switch> + </case> + <case + latin:hasSettingsKey="true" + > + <switch> + <!-- When this qwerty keyboard has no voice key but voice key is enabled, then + symbol keyboard will have mic key. That means we should use "?123mic" key here. + --> + <case + latin:voiceKeyEnabled="true" + latin:hasVoiceKey="false" + > + <Key + latin:codes="@integer/key_symbol" + latin:keyIcon="@drawable/sym_keyboard_123_mic" + latin:iconPreview="@drawable/sym_keyboard_feedback_123_mic" + latin:keyWidth="15%p" + latin:isModifier="true" + latin:keyEdgeFlags="left" /> + </case> + <default> + <Key + latin:codes="@integer/key_symbol" + latin:keyLabel="@string/label_symbol_key" + latin:keyWidth="15%p" + latin:isModifier="true" + latin:keyEdgeFlags="left" /> + </default> + </switch> + </case> + </switch> +</merge> diff --git a/java/res/xml/kbd_symbols_black_f1.xml b/java/res/xml/kbd_symbols_black_f1.xml new file mode 100644 index 000000000..353b007ad --- /dev/null +++ b/java/res/xml/kbd_symbols_black_f1.xml @@ -0,0 +1,46 @@ +<?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. +*/ +--> + +<merge + xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" +> + <switch> + <case + latin:hasVoiceKey="true" + > + <Key + latin:codes="@integer/key_voice" + latin:popupKeyboard="@xml/popup_mic" + latin:keyIcon="@drawable/sym_bkeyboard_mic" + latin:iconPreview="@drawable/sym_keyboard_feedback_mic" + latin:keyHintIcon="@drawable/hint_popup" + latin:isModifier="true" /> + </case> + <case + latin:hasVoiceKey="false" + > + <Key + latin:keyLabel="," + latin:popupKeyboard="@xml/popup_comma" + latin:keyHintIcon="@drawable/hint_popup" + latin:isModifier="true" /> + </case> + </switch> +</merge> diff --git a/java/res/xml/kbd_symbols_black_row4.xml b/java/res/xml/kbd_symbols_black_row4.xml index d1ed52717..a50f8c05d 100644 --- a/java/res/xml/kbd_symbols_black_row4.xml +++ b/java/res/xml/kbd_symbols_black_row4.xml @@ -26,15 +26,15 @@ > <switch> <case - latin:settingsKey="false" + latin:hasSettingsKey="false" > <Key latin:codes="@integer/key_symbol" latin:keyLabel="@string/label_alpha_key" latin:keyWidth="20%p" latin:keyEdgeFlags="left" /> - <Key - latin:codes="@integer/key_f1" /> + <include + latin:keyboardLayout="@xml/kbd_symbols_black_f1" /> <Key latin:codes="@integer/key_space" latin:keyIcon="@drawable/sym_bkeyboard_space" @@ -67,7 +67,7 @@ </switch> </case> <case - latin:settingsKey="true" + latin:hasSettingsKey="true" > <Key latin:codes="@integer/key_symbol" @@ -78,8 +78,8 @@ latin:codes="@integer/key_settings" latin:keyIcon="@drawable/sym_bkeyboard_settings" latin:iconPreview="@drawable/sym_keyboard_feedback_settings" /> - <Key - latin:codes="@integer/key_f1" /> + <include + latin:keyboardLayout="@xml/kbd_symbols_black_f1" /> <Key latin:codes="@integer/key_space" latin:keyIcon="@drawable/sym_bkeyboard_space" diff --git a/java/res/xml/kbd_symbols_f1.xml b/java/res/xml/kbd_symbols_f1.xml new file mode 100644 index 000000000..39c411a9c --- /dev/null +++ b/java/res/xml/kbd_symbols_f1.xml @@ -0,0 +1,46 @@ +<?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. +*/ +--> + +<merge + xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" +> + <switch> + <case + latin:hasVoiceKey="true" + > + <Key + latin:codes="@integer/key_voice" + latin:popupKeyboard="@xml/popup_mic" + latin:keyIcon="@drawable/sym_keyboard_mic" + latin:iconPreview="@drawable/sym_keyboard_feedback_mic" + latin:keyHintIcon="@drawable/hint_popup" + latin:isModifier="true" /> + </case> + <case + latin:hasVoiceKey="false" + > + <Key + latin:keyLabel="," + latin:popupKeyboard="@xml/popup_comma" + latin:keyHintIcon="@drawable/hint_popup" + latin:isModifier="true" /> + </case> + </switch> +</merge> diff --git a/java/res/xml/kbd_symbols_row4.xml b/java/res/xml/kbd_symbols_row4.xml index 4b3dd9071..f012a4d25 100644 --- a/java/res/xml/kbd_symbols_row4.xml +++ b/java/res/xml/kbd_symbols_row4.xml @@ -26,7 +26,7 @@ > <switch> <case - latin:settingsKey="false" + latin:hasSettingsKey="false" > <Key latin:codes="@integer/key_symbol" @@ -34,9 +34,8 @@ latin:keyWidth="20%p" latin:isModifier="true" latin:keyEdgeFlags="left" /> - <Key - latin:codes="@integer/key_f1" - latin:isModifier="true" /> + <include + latin:keyboardLayout="@xml/kbd_symbols_f1" /> <Key latin:codes="@integer/key_space" latin:keyIcon="@drawable/sym_keyboard_space" @@ -73,7 +72,7 @@ </switch> </case> <case - latin:settingsKey="true" + latin:hasSettingsKey="true" > <Key latin:codes="@integer/key_symbol" @@ -86,9 +85,8 @@ latin:keyIcon="@drawable/sym_keyboard_settings" latin:iconPreview="@drawable/sym_keyboard_feedback_settings" latin:isModifier="true" /> - <Key - latin:codes="@integer/key_f1" - latin:isModifier="true" /> + <include + latin:keyboardLayout="@xml/kbd_symbols_f1" /> <Key latin:codes="@integer/key_space" latin:keyIcon="@drawable/sym_keyboard_space" diff --git a/java/res/xml/kbd_symbols_shift_black_row4.xml b/java/res/xml/kbd_symbols_shift_black_row4.xml index e18ab211a..4e5ddcdd4 100644 --- a/java/res/xml/kbd_symbols_shift_black_row4.xml +++ b/java/res/xml/kbd_symbols_shift_black_row4.xml @@ -26,7 +26,7 @@ > <switch> <case - latin:settingsKey="false" + latin:hasSettingsKey="false" > <Key latin:codes="@integer/key_symbol" @@ -65,7 +65,7 @@ </switch> </case> <case - latin:settingsKey="true" + latin:hasSettingsKey="true" > <Key latin:codes="@integer/key_symbol" diff --git a/java/res/xml/kbd_symbols_shift_row4.xml b/java/res/xml/kbd_symbols_shift_row4.xml index f0df1307b..170c8b90a 100644 --- a/java/res/xml/kbd_symbols_shift_row4.xml +++ b/java/res/xml/kbd_symbols_shift_row4.xml @@ -26,7 +26,7 @@ > <switch> <case - latin:settingsKey="false" + latin:hasSettingsKey="false" > <Key latin:codes="@integer/key_symbol" @@ -71,7 +71,7 @@ </switch> </case> <case - latin:settingsKey="true" + latin:hasSettingsKey="true" > <Key latin:codes="@integer/key_symbol" |