diff options
Diffstat (limited to 'java/res/xml')
43 files changed, 2755 insertions, 2363 deletions
diff --git a/java/res/xml/kbd_currency_key_styles.xml b/java/res/xml/kbd_currency_key_styles.xml new file mode 100644 index 000000000..9d3bb4725 --- /dev/null +++ b/java/res/xml/kbd_currency_key_styles.xml @@ -0,0 +1,99 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** +** Copyright 2011, 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:passwordInput="true" + > + <key-style + latin:styleName="currencyKeyStyle" + latin:keyLabel="$" /> + </case> + <!-- Countries using Euro currency, 23 countries as for January 2011. --> + 1. Andorra (ca_AD, ca_ES) + 2. Austria (de_AT) + 3. Belgium (nl_BE, fr_BE, de_BE) + 4. Cyprus (el_CY, tr_CY) + 5. Estonia (et_EE) + 6. Finland (fi_FI, sv_FI) + 7. France (fr_FR) + 8. Germany (de_DE) + 9. Greece (el_GR) + 10. Ireland (ga_IE, en_IE) + 11. Italy (it_IT) + 12. Kosovo (??_XK) ?? + 13. Luxembourg (lb_LU, fr_LU, de_LU) + 14. Malta (mt_MT, en_MT) + 15. Monaco (fr_MO) + 16. Montenegro (sla_ME) + 17. Netherlands (nl_NL) + 18. Portugal (pt_PT) + 19. San Marino (it_SM) + 20. Slovakia (sk_SK) + 21. Slovenia (sl_SI) + 22. Spain (es_ES, ca_ES) + 23. Vatican City (it_VA) + --> + <!-- Note: Some locales may not have country code, and it it supposed to indicate the + country where the language originally/mainly spoken. --> + <case + latin:localeCode="de|es|el|fi|fr|it|nl|sk|sl|pt_PT" + > + <key-style + latin:styleName="currencyKeyStyle" + latin:keyLabel="€" + latin:popupCharacters="@string/alternates_for_currency_euro" /> + </case> + <case + latin:languageCode="ca|et|lb|mt|sla" + > + <key-style + latin:styleName="currencyKeyStyle" + latin:keyLabel="€" + latin:popupCharacters="@string/alternates_for_currency_euro" /> + </case> + <case + latin:countryCode="AD|AT|BE|CY|EE|FI|FR|DE|GR|IE|IT|XK|LU|MT|MO|ME|NL|PT|SM|SK|SI|ES|VA" + > + <key-style + latin:styleName="currencyKeyStyle" + latin:keyLabel="€" + latin:popupCharacters="@string/alternates_for_currency_euro" /> + </case> + <!-- United Kingdom --> + <case + latin:countryCode="GB" + > + <key-style + latin:styleName="currencyKeyStyle" + latin:keyLabel="£" + latin:popupCharacters="@string/alternates_for_currency_pound" /> + </case> + <default> + <key-style + latin:styleName="currencyKeyStyle" + latin:keyLabel="$" + latin:popupCharacters="@string/alternates_for_currency_dollar" /> + </default> + </switch> +</merge> diff --git a/java/res/xml/kbd_key_styles.xml b/java/res/xml/kbd_key_styles.xml new file mode 100644 index 000000000..63d519c4c --- /dev/null +++ b/java/res/xml/kbd_key_styles.xml @@ -0,0 +1,216 @@ +<?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" +> + <!-- Base key style for the functional key --> + <key-style + latin:styleName="functionalKeyStyle" + latin:isFunctional="true" /> + <!-- Base key style for the key which may have settings key as popup key --> + <switch> + <case + latin:clobberSettingsKey="true" + > + <key-style + latin:styleName="settingsPopupStyle" + latin:parentStyle="functionalKeyStyle" /> + </case> + <case + latin:clobberSettingsKey="false" + latin:hasSettingsKey="true" + > + <key-style + latin:styleName="settingsPopupStyle" + latin:parentStyle="functionalKeyStyle" /> + </case> + <!-- clobberSettingsKey="false" and hasSettingsKey="false" --> + <default> + <key-style + latin:styleName="settingsPopupStyle" + latin:keyLabelOption="popupHint" + latin:popupCharacters="\@icon/5|\@integer/key_settings" + latin:parentStyle="functionalKeyStyle" /> + </default> + </switch> + <!-- Functional key styles --> + <key-style + latin:styleName="shiftKeyStyle" + latin:code="@integer/key_shift" + latin:keyIcon="iconShiftKey" + latin:keyIconShifted="iconShiftedShiftKey" + latin:parentStyle="functionalKeyStyle" + latin:isSticky="true" /> + <key-style + latin:styleName="deleteKeyStyle" + latin:code="@integer/key_delete" + latin:keyIcon="iconDeleteKey" + latin:parentStyle="functionalKeyStyle" + latin:isRepeatable="true" /> + <!-- Return key style --> + <switch> + <case + latin:imeAction="actionGo" + > + <key-style + latin:styleName="returnKeyStyle" + latin:code="@integer/key_return" + latin:keyLabel="@string/label_go_key" + latin:parentStyle="functionalKeyStyle" /> + </case> + <case + latin:imeAction="actionNext" + > + <key-style + latin:styleName="returnKeyStyle" + latin:code="@integer/key_return" + latin:keyLabel="@string/label_next_key" + latin:parentStyle="functionalKeyStyle" /> + </case> + <case + latin:imeAction="actionDone" + > + <key-style + latin:styleName="returnKeyStyle" + latin:code="@integer/key_return" + latin:keyLabel="@string/label_done_key" + latin:parentStyle="functionalKeyStyle" /> + </case> + <case + latin:imeAction="actionSend" + > + <key-style + latin:styleName="returnKeyStyle" + latin:code="@integer/key_return" + latin:keyLabel="@string/label_send_key" + latin:parentStyle="functionalKeyStyle" /> + </case> + <case + latin:imeAction="actionSearch" + > + <key-style + latin:styleName="returnKeyStyle" + latin:code="@integer/key_return" + latin:keyIcon="iconSearchKey" + latin:parentStyle="functionalKeyStyle" /> + </case> + <default> + <key-style + latin:styleName="returnKeyStyle" + latin:code="@integer/key_return" + latin:keyIcon="iconReturnKey" + latin:parentStyle="functionalKeyStyle" /> + </default> + </switch> + <key-style + latin:styleName="spaceKeyStyle" + latin:code="@integer/key_space" + latin:keyIconPreview="iconPreviewSpaceKey" + latin:parentStyle="functionalKeyStyle" /> + <key-style + latin:styleName="smileyKeyStyle" + latin:keyLabel=":-)" + latin:keyOutputText=":-) " + latin:keyLabelOption="popupHint" + latin:popupCharacters="@string/alternates_for_smiley" + latin:maxPopupKeyboardColumn="5" + latin:parentStyle="functionalKeyStyle" /> + <key-style + latin:styleName="shortcutKeyStyle" + latin:code="@integer/key_shortcut" + latin:keyIcon="iconShortcutKey" + latin:keyIconPreview="iconPreviewShortcutKey" + latin:parentStyle="settingsPopupStyle" /> + <key-style + latin:styleName="settingsKeyStyle" + latin:code="@integer/key_settings" + latin:keyIcon="iconSettingsKey" + latin:keyIconPreview="iconPreviewSettingsKey" + latin:parentStyle="functionalKeyStyle" /> + <key-style + latin:styleName="tabKeyStyle" + latin:code="@integer/key_tab" + latin:keyIcon="iconTabKey" + latin:keyIconPreview="iconPreviewTabKey" + latin:parentStyle="functionalKeyStyle" /> + <!-- Note: This key style is not for functional tab key. This is used for the tab key which is + laid out as normal letter key. --> + <key-style + latin:styleName="nonSpecialBackgroundTabKeyStyle" + latin:code="@integer/key_tab" + latin:keyIcon="iconTabKey" + latin:keyIconPreview="iconPreviewTabKey" /> + <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-style + latin:styleName="toSymbolKeyStyle" + latin:code="@integer/key_switch_alpha_symbol" + latin:keyIcon="iconToSymbolKeyWithShortcut" + latin:parentStyle="functionalKeyStyle" /> + </case> + <default> + <key-style + latin:styleName="toSymbolKeyStyle" + latin:code="@integer/key_switch_alpha_symbol" + latin:keyLabel="@string/label_to_symbol_key" + latin:parentStyle="functionalKeyStyle" /> + </default> + </switch> + <key-style + latin:styleName="toAlphaKeyStyle" + latin:code="@integer/key_switch_alpha_symbol" + latin:keyLabel="@string/label_to_alpha_key" + latin:parentStyle="functionalKeyStyle" /> + <key-style + latin:styleName="altKeyStyle" + latin:code="@integer/key_shift" + latin:keyLabel="@string/label_alt_key" + latin:parentStyle="functionalKeyStyle" + latin:isSticky="true" /> + <switch> + <case + latin:passwordInput="true" + > + <key-style + latin:styleName="nonPasswordSymbolKeyStyle" + latin:enabled="false" /> + <key-style + latin:styleName="nonPasswordFunctionalKeyStyle" + latin:enabled="false" + latin:parentStyle="functionalKeyStyle" /> + </case> + <!-- latin:passwordInput="false" --> + <default> + <key-style + latin:styleName="nonPasswordSymbolKeyStyle" + latin:enabled="true" /> + <key-style + latin:styleName="nonPasswordFunctionalKeyStyle" + latin:enabled="true" + latin:parentStyle="functionalKeyStyle" /> + </default> + </switch> +</merge> diff --git a/java/res/xml/kbd_number.xml b/java/res/xml/kbd_number.xml new file mode 100644 index 000000000..429b81846 --- /dev/null +++ b/java/res/xml/kbd_number.xml @@ -0,0 +1,141 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** +** Copyright 2008, 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="26.67%p" +> + <include + latin:keyboardLayout="@xml/kbd_key_styles" /> + <include + latin:keyboardLayout="@xml/kbd_numkey_styles" /> + <switch> + <case + latin:passwordInput="true" + > + <Row + latin:rowEdgeFlags="top" + > + <Key + latin:keyStyle="num1KeyStyle" + latin:keyEdgeFlags="left" /> + <Key + latin:keyStyle="num2KeyStyle" /> + <Key + latin:keyStyle="num3KeyStyle" /> + </Row> + <Row> + <Key + latin:keyStyle="num4KeyStyle" + latin:keyEdgeFlags="left" /> + <Key + latin:keyStyle="num5KeyStyle" /> + <Key + latin:keyStyle="num6KeyStyle" /> + </Row> + <Row> + <Key + latin:keyStyle="num7KeyStyle" + latin:keyEdgeFlags="left" /> + <Key + latin:keyStyle="num8KeyStyle" /> + <Key + latin:keyStyle="num9KeyStyle" /> + <Key + latin:keyStyle="deleteKeyStyle" + latin:keyWidth="fillRight" + latin:keyEdgeFlags="right" /> + </Row> + <Row + latin:rowEdgeFlags="bottom" + > + <Spacer /> + <Key + latin:keyStyle="num0KeyStyle" /> + <Spacer /> + <Key + latin:keyStyle="returnKeyStyle" + latin:keyWidth="fillRight" + latin:keyEdgeFlags="right" /> + </Row> + </case> + <!-- latin:passwordInput="false" --> + <default> + <Row + latin:rowEdgeFlags="top" + > + <Key + latin:keyLabel="1" + latin:keyEdgeFlags="left" /> + <Key + latin:keyLabel="2" /> + <Key + latin:keyLabel="3" /> + <Key + latin:keyLabel="-" + latin:keyStyle="functionalKeyStyle" + latin:keyWidth="fillRight" + latin:keyEdgeFlags="right" /> + </Row> + <Row> + <Key + latin:keyLabel="4" + latin:keyEdgeFlags="left" /> + <Key + latin:keyLabel="5" /> + <Key + latin:keyLabel="6" /> + <Key + latin:keyLabel="," + latin:keyStyle="functionalKeyStyle" + latin:keyWidth="fillRight" + latin:keyEdgeFlags="right" /> + </Row> + <Row> + <Key + latin:keyLabel="7" + latin:keyEdgeFlags="left" /> + <Key + latin:keyLabel="8" /> + <Key + latin:keyLabel="9" /> + <Key + latin:keyStyle="deleteKeyStyle" + latin:keyWidth="fillRight" + latin:keyEdgeFlags="right" /> + </Row> + <Row + latin:rowEdgeFlags="bottom" + > + <Key + latin:keyStyle="numSpaceKeyStyle" + latin:keyEdgeFlags="left" /> + <Key + latin:keyLabel="0" /> + <Key + latin:keyLabel="." /> + <Key + latin:keyStyle="returnKeyStyle" + latin:keyWidth="fillRight" + latin:keyEdgeFlags="right" /> + </Row> + </default> + </switch> +</Keyboard> diff --git a/java/res/xml/kbd_numkey_styles.xml b/java/res/xml/kbd_numkey_styles.xml new file mode 100644 index 000000000..3a26a022b --- /dev/null +++ b/java/res/xml/kbd_numkey_styles.xml @@ -0,0 +1,95 @@ +<?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" +> + <key-style + latin:styleName="num0KeyStyle" + latin:code="48" + latin:keyIcon="iconNum0Key" /> + <key-style + latin:styleName="num1KeyStyle" + latin:code="49" + latin:keyIcon="iconNum1Key" /> + <key-style + latin:styleName="num2KeyStyle" + latin:code="50" + latin:keyIcon="iconNum2Key" /> + <key-style + latin:styleName="num3KeyStyle" + latin:code="51" + latin:keyIcon="iconNum3Key" /> + <key-style + latin:styleName="num4KeyStyle" + latin:code="52" + latin:keyIcon="iconNum4Key" /> + <key-style + latin:styleName="num5KeyStyle" + latin:code="53" + latin:keyIcon="iconNum5Key" /> + <key-style + latin:styleName="num6KeyStyle" + latin:code="54" + latin:keyIcon="iconNum6Key" /> + <key-style + latin:styleName="num7KeyStyle" + latin:code="55" + latin:keyIcon="iconNum7Key" /> + <key-style + latin:styleName="num8KeyStyle" + latin:code="56" + latin:keyIcon="iconNum8Key" /> + <key-style + latin:styleName="num9KeyStyle" + latin:code="57" + latin:keyIcon="iconNum9Key" /> + <key-style + latin:styleName="numLabelStyle" + latin:keyLabelOption="fontFixedWidth|followKeyLetterRatio" /> + <key-style + latin:styleName="numLabelFunctionalStyle" + latin:keyLabelOption="fontFixedWidth|followKeyLetterRatio" + latin:parentStyle="functionalKeyStyle" /> + <key-style + latin:styleName="numStarKeyStyle" + latin:code="42" + latin:keyLabel="\uff0a" + latin:parentStyle="numLabelStyle" /> + <key-style + latin:styleName="numPoundKeyStyle" + latin:keyLabel="#" + latin:parentStyle="numLabelStyle" /> + <key-style + latin:styleName="numSwitchToAltKeyStyle" + latin:code="@integer/key_switch_alpha_symbol" + latin:keyLabel="@string/label_to_phone_symbols_key" + latin:parentStyle="numLabelStyle" /> + <key-style + latin:styleName="numSwitchToNumericKeyStyle" + latin:code="@integer/key_switch_alpha_symbol" + latin:keyLabel="@string/label_to_phone_numeric_key" + latin:parentStyle="numLabelStyle" /> + <key-style + latin:styleName="numSpaceKeyStyle" + latin:code="@integer/key_space" + latin:keyIcon="iconSpaceKey" + latin:keyIconPreview="iconPreviewSpaceKey" /> +</merge> diff --git a/java/res/xml/kbd_phone.xml b/java/res/xml/kbd_phone.xml index 10774c666..794528c2b 100644 --- a/java/res/xml/kbd_phone.xml +++ b/java/res/xml/kbd_phone.xml @@ -19,88 +19,69 @@ --> <Keyboard - xmlns:android="http://schemas.android.com/apk/res/android" - android:keyWidth="26.67%p" - android:horizontalGap="0px" - android:verticalGap="@dimen/key_bottom_gap" - android:keyHeight="@dimen/key_height" + xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" + latin:keyWidth="26.67%p" > + <include + latin:keyboardLayout="@xml/kbd_key_styles" /> + <include + latin:keyboardLayout="@xml/kbd_numkey_styles" /> <Row - android:rowEdgeFlags="top" + latin:rowEdgeFlags="top" > <Key - android:codes="49" - android:keyIcon="@drawable/sym_keyboard_num1" - android:keyEdgeFlags="left" /> + latin:keyStyle="num1KeyStyle" + latin:keyEdgeFlags="left" /> <Key - android:codes="50" - android:keyIcon="@drawable/sym_keyboard_num2" /> + latin:keyStyle="num2KeyStyle" /> <Key - android:codes="51" - android:keyIcon="@drawable/sym_keyboard_num3" /> + latin:keyStyle="num3KeyStyle" /> <Key - android:keyLabel="-" - android:keyWidth="20%p" - android:isModifier="true" - android:keyEdgeFlags="right" /> + latin:keyLabel="-" + latin:keyStyle="numLabelFunctionalStyle" + latin:keyWidth="fillRight" + latin:keyEdgeFlags="right" /> </Row> <Row> <Key - android:codes="52" - android:keyIcon="@drawable/sym_keyboard_num4" - android:keyEdgeFlags="left" /> + latin:keyStyle="num4KeyStyle" + latin:keyEdgeFlags="left" /> <Key - android:codes="53" - android:keyIcon="@drawable/sym_keyboard_num5" /> + latin:keyStyle="num5KeyStyle" /> <Key - android:codes="54" - android:keyIcon="@drawable/sym_keyboard_num6" /> + latin:keyStyle="num6KeyStyle" /> <Key - android:keyLabel="." - android:keyWidth="20%p" - android:isModifier="true" - android:keyEdgeFlags="right" /> + latin:keyLabel="." + latin:keyStyle="numLabelFunctionalStyle" + latin:keyWidth="fillRight" + latin:keyEdgeFlags="right" /> </Row> <Row> <Key - android:codes="55" - android:keyIcon="@drawable/sym_keyboard_num7" - android:keyEdgeFlags="left" /> + latin:keyStyle="num7KeyStyle" + latin:keyEdgeFlags="left" /> <Key - android:codes="56" - android:keyIcon="@drawable/sym_keyboard_num8" /> + latin:keyStyle="num8KeyStyle" /> <Key - android:codes="57" - android:keyIcon="@drawable/sym_keyboard_num9" /> + latin:keyStyle="num9KeyStyle" /> <Key - android:codes="@integer/key_delete" - android:keyIcon="@drawable/sym_keyboard_delete" - android:iconPreview="@drawable/sym_keyboard_feedback_delete" - android:keyWidth="20%p" - android:isModifier="true" - android:isRepeatable="true" - android:keyEdgeFlags="right" /> + latin:keyStyle="deleteKeyStyle" + latin:keyWidth="fillRight" + latin:keyEdgeFlags="right" /> </Row> <Row - android:rowEdgeFlags="bottom" + latin:rowEdgeFlags="bottom" > <Key - android:codes="@integer/key_symbol" - android:keyIcon="@drawable/sym_keyboard_numalt" - android:iconPreview="@drawable/sym_keyboard_feedback_numalt" - android:keyEdgeFlags="left" /> + latin:keyStyle="numSwitchToAltKeyStyle" + latin:keyEdgeFlags="left" /> <Key - android:codes="48" - android:keyIcon="@drawable/sym_keyboard_num0" /> + latin:keyStyle="num0KeyStyle" /> <Key - android:codes="@integer/key_space" - android:keyIcon="@drawable/sym_keyboard_space" - android:iconPreview="@drawable/sym_keyboard_feedback_space" /> + latin:keyStyle="numSpaceKeyStyle" /> <Key - android:codes="@integer/key_return" - android:keyIcon="@drawable/sym_keyboard_return" - android:keyWidth="20%p" - android:isModifier="true" - android:keyEdgeFlags="right" /> + latin:keyStyle="returnKeyStyle" + latin:keyWidth="fillRight" + latin:keyEdgeFlags="right" /> </Row> </Keyboard> diff --git a/java/res/xml/kbd_phone_black.xml b/java/res/xml/kbd_phone_black.xml deleted file mode 100644 index 5afa9a194..000000000 --- a/java/res/xml/kbd_phone_black.xml +++ /dev/null @@ -1,101 +0,0 @@ -<?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:android="http://schemas.android.com/apk/res/android" - android:keyWidth="26.67%p" - android:horizontalGap="0px" - android:verticalGap="@dimen/key_bottom_gap" - android:keyHeight="@dimen/key_height" -> - <Row - android:rowEdgeFlags="top" - > - <Key - android:codes="49" - android:keyIcon="@drawable/sym_bkeyboard_num1" - android:keyEdgeFlags="left" /> - <Key - android:codes="50" - android:keyIcon="@drawable/sym_bkeyboard_num2" /> - <Key - android:codes="51" - android:keyIcon="@drawable/sym_bkeyboard_num3" /> - <Key - android:keyLabel="-" - android:keyWidth="20%p" - android:keyEdgeFlags="right" /> - </Row> - <Row> - <Key - android:codes="52" - android:keyIcon="@drawable/sym_bkeyboard_num4" - android:keyEdgeFlags="left" /> - <Key - android:codes="53" - android:keyIcon="@drawable/sym_bkeyboard_num5" /> - <Key - android:codes="54" - android:keyIcon="@drawable/sym_bkeyboard_num6" /> - <Key - android:keyLabel="." - android:keyWidth="20%p" - android:keyEdgeFlags="right" /> - </Row> - <Row> - <Key - android:codes="55" - android:keyIcon="@drawable/sym_bkeyboard_num7" - android:keyEdgeFlags="left" /> - <Key - android:codes="56" - android:keyIcon="@drawable/sym_bkeyboard_num8" /> - <Key - android:codes="57" - android:keyIcon="@drawable/sym_bkeyboard_num9" /> - <Key - android:codes="@integer/key_delete" - android:keyIcon="@drawable/sym_bkeyboard_delete" - android:iconPreview="@drawable/sym_keyboard_feedback_delete" - android:keyWidth="20%p" - android:isRepeatable="true" - android:keyEdgeFlags="right" /> - </Row> - <Row - android:rowEdgeFlags="bottom" - > - <Key - android:codes="@integer/key_symbol" - android:keyIcon="@drawable/sym_bkeyboard_numalt" - android:iconPreview="@drawable/sym_keyboard_feedback_numalt" /> - <Key - android:codes="48" - android:keyIcon="@drawable/sym_bkeyboard_num0" /> - <Key - android:codes="@integer/key_space" - android:keyIcon="@drawable/sym_bkeyboard_space" - android:iconPreview="@drawable/sym_keyboard_feedback_space" /> - <Key - android:codes="@integer/key_return" - android:keyIcon="@drawable/sym_bkeyboard_return" - android:keyWidth="20%p" - android:keyEdgeFlags="right" /> - </Row> -</Keyboard> diff --git a/java/res/xml/kbd_phone_symbols.xml b/java/res/xml/kbd_phone_symbols.xml index 4c928a8d8..1405c3c21 100644 --- a/java/res/xml/kbd_phone_symbols.xml +++ b/java/res/xml/kbd_phone_symbols.xml @@ -19,84 +19,81 @@ --> <Keyboard - xmlns:android="http://schemas.android.com/apk/res/android" - android:keyWidth="26.67%p" - android:horizontalGap="0px" - android:verticalGap="@dimen/key_bottom_gap" - android:keyHeight="@dimen/key_height" + xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" + latin:keyWidth="26.67%p" > + <include + latin:keyboardLayout="@xml/kbd_key_styles" /> + <include + latin:keyboardLayout="@xml/kbd_numkey_styles" /> <Row - android:rowEdgeFlags="top" + latin:rowEdgeFlags="top" > <Key - android:keyLabel="(" - android:keyEdgeFlags="left" /> + latin:keyLabel="(" + latin:keyStyle="numLabelStyle" + latin:keyEdgeFlags="left" /> <Key - android:keyLabel="/" /> + latin:keyLabel="/" + latin:keyStyle="numLabelStyle" /> <Key - android:keyLabel=")" /> + latin:keyLabel=")" + latin:keyStyle="numLabelStyle" /> <Key - android:keyLabel="-" - android:keyWidth="20%p" - android:isModifier="true" - android:keyEdgeFlags="right" /> + latin:keyLabel="-" + latin:keyStyle="numLabelFunctionalStyle" + latin:keyWidth="fillRight" + latin:keyEdgeFlags="right" /> </Row> <Row> <Key - android:keyLabel="N" - android:keyEdgeFlags="left" /> + latin:keyLabel="N" + latin:keyStyle="numLabelStyle" + latin:keyEdgeFlags="left" /> <!-- Pause is a comma. Check PhoneNumberUtils.java to see if this has changed. --> <Key - android:codes="44" - android:keyLabel="Pause" /> + latin:code="44" + latin:keyLabel="Pause" /> <Key - android:keyLabel="," /> + latin:keyLabel="," + latin:keyStyle="numLabelStyle" /> <Key - android:keyLabel="." - android:keyWidth="20%p" - android:isModifier="true" - android:keyEdgeFlags="right" /> + latin:keyLabel="." + latin:keyStyle="numLabelFunctionalStyle" + latin:keyWidth="fillRight" + latin:keyEdgeFlags="right" /> </Row> <Row> <Key - android:codes="42" - android:keyIcon="@drawable/sym_keyboard_numstar" - android:keyEdgeFlags="left" /> + latin:keyStyle="numStarKeyStyle" + latin:keyEdgeFlags="left" /> <!-- Wait is a semicolon. --> <Key - android:codes="59" - android:keyLabel="Wait" /> + latin:code="59" + latin:keyLabel="Wait" /> <Key - android:codes="35" - android:keyIcon="@drawable/sym_keyboard_numpound" /> + latin:keyLabel="#" + latin:keyStyle="numLabelStyle" /> <Key - android:codes="@integer/key_delete" - android:keyIcon="@drawable/sym_keyboard_delete" - android:iconPreview="@drawable/sym_keyboard_feedback_delete" - android:keyWidth="20%p" - android:isModifier="true" - android:isRepeatable="true" - android:keyEdgeFlags="right" /> + latin:keyStyle="deleteKeyStyle" + latin:keyWidth="fillRight" + latin:keyEdgeFlags="right" /> </Row> <Row - android:rowEdgeFlags="bottom" + latin:rowEdgeFlags="bottom" > <Key - android:codes="@integer/key_symbol" - android:keyLabel="@string/label_phone_key" - android:keyEdgeFlags="left" /> + latin:keyStyle="numSwitchToNumericKeyStyle" + latin:keyEdgeFlags="left" /> <Key - android:keyLabel="+" /> + latin:keyLabel="+" + latin:keyStyle="numLabelStyle" /> <Key - android:codes="@integer/key_space" - android:keyIcon="@drawable/sym_keyboard_space" - android:iconPreview="@drawable/sym_keyboard_feedback_space" /> + latin:keyStyle="numSpaceKeyStyle" /> <Key - android:codes="@integer/key_return" - android:keyIcon="@drawable/sym_keyboard_return" - android:keyWidth="20%p" - android:isModifier="true" - android:keyEdgeFlags="right" /> + latin:keyStyle="returnKeyStyle" + latin:keyWidth="fillRight" + latin:keyEdgeFlags="right" /> </Row> </Keyboard> diff --git a/java/res/xml/kbd_phone_symbols_black.xml b/java/res/xml/kbd_phone_symbols_black.xml deleted file mode 100644 index 4d686e145..000000000 --- a/java/res/xml/kbd_phone_symbols_black.xml +++ /dev/null @@ -1,98 +0,0 @@ -<?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:android="http://schemas.android.com/apk/res/android" - android:keyWidth="26.67%p" - android:horizontalGap="0px" - android:verticalGap="@dimen/key_bottom_gap" - android:keyHeight="@dimen/key_height" -> - <Row - android:rowEdgeFlags="top" - > - <Key - android:keyLabel="(" - android:keyEdgeFlags="left" /> - <Key - android:keyLabel="/" /> - <Key - android:keyLabel=")" /> - <Key - android:keyLabel="-" - android:keyWidth="20%p" - android:keyEdgeFlags="right" /> - </Row> - <Row> - <Key - android:keyLabel="N" - android:keyEdgeFlags="left" /> - <!-- Pause is a comma. Check PhoneNumberUtils.java to see if this - has changed. --> - <Key - android:codes="44" - android:keyLabel="Pause" /> - <Key - android:keyLabel="," /> - <Key - android:keyLabel="." - android:keyWidth="20%p" - android:keyEdgeFlags="right" /> - </Row> - <Row> - <Key - android:codes="42" - android:keyIcon="@drawable/sym_bkeyboard_numstar" - android:keyEdgeFlags="left" /> - <!-- Wait is a semicolon. --> - <Key - android:codes="59" - android:keyLabel="Wait" /> - <Key - android:codes="35" - android:keyIcon="@drawable/sym_bkeyboard_numpound" /> - <Key - android:codes="@integer/key_delete" - android:keyIcon="@drawable/sym_bkeyboard_delete" - android:iconPreview="@drawable/sym_keyboard_feedback_delete" - android:keyWidth="20%p" - android:isRepeatable="true" - android:keyEdgeFlags="right" /> - </Row> - <Row - android:rowEdgeFlags="bottom" - > - <Key - android:codes="@integer/key_symbol" - android:keyLabel="@string/label_phone_key" - android:keyEdgeFlags="left" /> - <Key - android:keyLabel="+" /> - <Key - android:codes="@integer/key_space" - android:keyIcon="@drawable/sym_bkeyboard_space" - android:iconPreview="@drawable/sym_keyboard_feedback_space" /> - <Key - android:codes="@integer/key_return" - android:keyIcon="@drawable/sym_bkeyboard_return" - android:keyWidth="20%p" - android:keyEdgeFlags="right" /> - </Row> -</Keyboard> diff --git a/java/res/xml/kbd_popup_narrow_template.xml b/java/res/xml/kbd_popup_narrow_template.xml deleted file mode 100644 index 23c686e8b..000000000 --- a/java/res/xml/kbd_popup_narrow_template.xml +++ /dev/null @@ -1,27 +0,0 @@ -<?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:android="http://schemas.android.com/apk/res/android" - android:keyWidth="9.45%p" - android:horizontalGap="0px" - android:verticalGap="0px" - android:keyHeight="@dimen/popup_key_height" - > -</Keyboard> diff --git a/java/res/xml/kbd_popup_template.xml b/java/res/xml/kbd_popup_template.xml index a287be1fd..9ee27493d 100644 --- a/java/res/xml/kbd_popup_template.xml +++ b/java/res/xml/kbd_popup_template.xml @@ -18,10 +18,10 @@ */ --> -<Keyboard xmlns:android="http://schemas.android.com/apk/res/android" - android:keyWidth="10%p" - android:horizontalGap="0px" - android:verticalGap="0px" - android:keyHeight="@dimen/popup_key_height" +<Keyboard xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" + latin:keyWidth="10%p" + latin:horizontalGap="@dimen/key_horizontal_gap" + latin:verticalGap="0px" + latin:rowHeight="@dimen/popup_key_height" > </Keyboard> diff --git a/java/res/xml/kbd_qwerty.xml b/java/res/xml/kbd_qwerty.xml index a4ab0f8fe..40917b921 100644 --- a/java/res/xml/kbd_qwerty.xml +++ b/java/res/xml/kbd_qwerty.xml @@ -19,487 +19,9 @@ --> <Keyboard - xmlns:android="http://schemas.android.com/apk/res/android" - android:keyWidth="10%p" - android:horizontalGap="0px" - android:verticalGap="@dimen/key_bottom_gap" - android:keyHeight="@dimen/key_height" + xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" + latin:keyboardLocale="en_GB,en_US" > - <Row - android:rowEdgeFlags="top" - > - <Key - android:keyLabel="q" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="@string/alternates_for_q" - android:keyEdgeFlags="left" /> - <Key - android:keyLabel="w" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="@string/alternates_for_w" /> - <Key - android:keyLabel="e" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="@string/alternates_for_e" /> - <Key - android:keyLabel="r" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="@string/alternates_for_r" /> - <Key - android:keyLabel="t" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="@string/alternates_for_t" /> - <Key - android:keyLabel="y" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="@string/alternates_for_y" /> - <Key - android:keyLabel="u" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="@string/alternates_for_u" /> - <Key - android:keyLabel="i" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="@string/alternates_for_i" /> - <Key - android:keyLabel="o" - android:popupKeyboard="@xml/kbd_popup_narrow_template" - android:popupCharacters="@string/alternates_for_o" /> - <Key - android:keyLabel="p" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="@string/alternates_for_p" - android:keyEdgeFlags="right" /> - </Row> - <Row> - <Key - android:keyLabel="a" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="@string/alternates_for_a" - android:horizontalGap="5%p" - android:keyEdgeFlags="left" /> - <Key - android:keyLabel="s" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="@string/alternates_for_s" /> - <Key - android:keyLabel="d" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="@string/alternates_for_d" /> - <Key - android:keyLabel="f" /> - <Key - android:keyLabel="g" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="@string/alternates_for_g" /> - <Key - android:keyLabel="h" /> - <Key - android:keyLabel="j" /> - <Key - android:keyLabel="k" /> - <Key - android:keyLabel="l" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="@string/alternates_for_l" - android:keyEdgeFlags="right" /> - </Row> - <Row> - <Key - android:codes="@integer/key_shift" - android:keyIcon="@drawable/sym_keyboard_shift" - android:iconPreview="@drawable/sym_keyboard_feedback_shift" - android:keyWidth="15%p" - android:isModifier="true" - android:isSticky="true" - android:keyEdgeFlags="left" /> - <Key - android:keyLabel="z" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="@string/alternates_for_z" /> - <Key - android:keyLabel="x" /> - <Key - android:keyLabel="c" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="@string/alternates_for_c" /> - <Key - android:keyLabel="v" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="@string/alternates_for_v" /> - <Key - android:keyLabel="b" /> - <Key - android:keyLabel="n" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="@string/alternates_for_n" /> - <Key - android:keyLabel="m" /> - <Key - android:codes="@integer/key_delete" - android:keyIcon="@drawable/sym_keyboard_delete" - android:iconPreview="@drawable/sym_keyboard_feedback_delete" - android:keyWidth="15%p" - android:isModifier="true" - android:isRepeatable="true" - android:keyEdgeFlags="right" /> - </Row> - <Row - android:keyboardMode="@+id/mode_normal" - android:rowEdgeFlags="bottom" - > - <Key - android:codes="@integer/key_symbol" - android:keyLabel="@string/label_symbol_key" - android:keyWidth="20%p" - android:isModifier="true" - android:keyEdgeFlags="left" /> - <Key - android:codes="@integer/key_f1" - android:isModifier="true" /> - <Key - android:codes="@integer/key_space" - android:keyIcon="@drawable/sym_keyboard_space" - android:iconPreview="@drawable/sym_keyboard_feedback_space" - android:keyWidth="40%p" - android:isModifier="true" /> - <Key - android:keyLabel="." - android:keyIcon="@drawable/hint_popup" - android:popupKeyboard="@xml/popup_punctuation" - android:isModifier="true" /> - <Key - android:codes="@integer/key_return" - android:keyIcon="@drawable/sym_keyboard_return" - android:iconPreview="@drawable/sym_keyboard_feedback_return" - android:keyWidth="20%p" - android:isModifier="true" - android:keyEdgeFlags="right" /> - </Row> - <Row - android:keyboardMode="@+id/mode_url" - android:rowEdgeFlags="bottom" - > - <Key - android:codes="@integer/key_symbol" - android:keyLabel="@string/label_symbol_key" - android:keyWidth="20%p" - android:isModifier="true" - android:keyEdgeFlags="left" /> - <Key - android:codes="@integer/key_f1" - android:isModifier="true" /> - <Key - android:codes="@integer/key_space" - android:keyIcon="@drawable/sym_keyboard_space" - android:iconPreview="@drawable/sym_keyboard_feedback_space" - android:keyWidth="40%p" - android:isModifier="true" /> - <Key - android:keyLabel="." - android:keyIcon="@drawable/hint_popup" - android:popupKeyboard="@xml/popup_punctuation" - android:isModifier="true" /> - <Key - android:codes="@integer/key_return" - android:keyIcon="@drawable/sym_keyboard_return" - android:iconPreview="@drawable/sym_keyboard_feedback_return" - android:keyWidth="20%p" - android:isModifier="true" - android:keyEdgeFlags="right" /> - </Row> - <Row - android:keyboardMode="@+id/mode_email" - android:rowEdgeFlags="bottom" - > - <Key - android:codes="@integer/key_symbol" - android:keyLabel="@string/label_symbol_key" - android:keyWidth="20%p" - android:isModifier="true" - android:keyEdgeFlags="left" /> - <Key - android:codes="@integer/key_f1" - android:isModifier="true" /> - <Key - android:codes="@integer/key_space" - android:keyIcon="@drawable/sym_keyboard_space" - android:iconPreview="@drawable/sym_keyboard_feedback_space" - android:keyWidth="40%p" - android:isModifier="true" /> - <Key - android:keyLabel="." - android:keyIcon="@drawable/hint_popup" - android:popupKeyboard="@xml/popup_punctuation" - android:isModifier="true" /> - <Key - android:codes="@integer/key_return" - android:keyIcon="@drawable/sym_keyboard_return" - android:iconPreview="@drawable/sym_keyboard_feedback_return" - android:keyWidth="20%p" - android:isModifier="true" - android:keyEdgeFlags="right" /> - </Row> - <Row - android:keyboardMode="@+id/mode_im" - android:rowEdgeFlags="bottom" - > - <Key - android:codes="@integer/key_symbol" - android:keyLabel="@string/label_symbol_key" - android:keyWidth="20%p" - android:isModifier="true" - android:keyEdgeFlags="left" /> - <Key - android:codes="@integer/key_f1" - android:isModifier="true" /> - <Key - android:codes="@integer/key_space" - android:keyIcon="@drawable/sym_keyboard_space" - android:iconPreview="@drawable/sym_keyboard_feedback_space" - android:keyWidth="40%p" - android:isModifier="true" /> - <Key - android:keyLabel="." - android:keyIcon="@drawable/hint_popup" - android:popupKeyboard="@xml/popup_punctuation" - android:isModifier="true" /> - <Key - android:keyLabel=":-)" - android:keyOutputText=":-) " - android:keyIcon="@drawable/hint_popup" - android:popupKeyboard="@xml/popup_smileys" - android:keyWidth="20%p" - android:isModifier="true" - android:keyEdgeFlags="right" /> - </Row> - <Row - android:keyboardMode="@+id/mode_webentry" - android:rowEdgeFlags="bottom" - > - <Key - android:codes="@integer/key_symbol" - android:keyLabel="@string/label_symbol_key" - android:keyWidth="20%p" - android:isModifier="true" - android:keyEdgeFlags="left" /> - <Key - android:codes="@integer/key_f1" - android:isModifier="true" /> - <Key - android:codes="@integer/key_space" - android:keyIcon="@drawable/sym_keyboard_space" - android:iconPreview="@drawable/sym_keyboard_feedback_space" - android:keyWidth="20%p" - android:isModifier="true" /> - <Key - android:codes="@integer/key_tab" - android:keyIcon="@drawable/sym_keyboard_tab" - android:iconPreview="@drawable/sym_keyboard_feedback_tab" - android:keyWidth="20%p" - android:isModifier="true" /> - <Key - android:keyLabel="." - android:keyIcon="@drawable/hint_popup" - android:popupKeyboard="@xml/popup_punctuation" - android:isModifier="true" /> - <Key - android:codes="@integer/key_return" - android:keyIcon="@drawable/sym_keyboard_return" - android:iconPreview="@drawable/sym_keyboard_feedback_return" - android:keyWidth="20%p" - android:isModifier="true" - android:keyEdgeFlags="right" /> - </Row> - <Row - android:keyboardMode="@+id/mode_normal_with_settings_key" - android:rowEdgeFlags="bottom" - > - <Key - android:codes="@integer/key_symbol" - android:keyLabel="@string/label_symbol_key" - android:keyWidth="15%p" - android:isModifier="true" - android:keyEdgeFlags="left" /> - <Key - android:codes="@integer/key_settings" - android:keyIcon="@drawable/sym_keyboard_settings" - android:iconPreview="@drawable/sym_keyboard_feedback_settings" - android:isModifier="true" /> - <Key - android:codes="@integer/key_f1" - android:isModifier="true" /> - <Key - android:codes="@integer/key_space" - android:keyIcon="@drawable/sym_keyboard_space" - android:iconPreview="@drawable/sym_keyboard_feedback_space" - android:keyWidth="30%p" - android:isModifier="true" /> - <Key - android:keyLabel="." - android:keyIcon="@drawable/hint_popup" - android:popupKeyboard="@xml/popup_punctuation" - android:isModifier="true" /> - <Key - android:codes="@integer/key_return" - android:keyIcon="@drawable/sym_keyboard_return" - android:iconPreview="@drawable/sym_keyboard_feedback_return" - android:keyWidth="25%p" - android:isModifier="true" - android:keyEdgeFlags="right" /> - </Row> - <Row - android:keyboardMode="@+id/mode_url_with_settings_key" - android:rowEdgeFlags="bottom" - > - <Key - android:codes="@integer/key_symbol" - android:keyLabel="@string/label_symbol_key" - android:keyWidth="15%p" - android:isModifier="true" - android:keyEdgeFlags="left" /> - <Key - android:codes="@integer/key_settings" - android:keyIcon="@drawable/sym_keyboard_settings" - android:iconPreview="@drawable/sym_keyboard_feedback_settings" - android:isModifier="true" /> - <Key - android:codes="@integer/key_f1" - android:isModifier="true" /> - <Key - android:codes="@integer/key_space" - android:keyIcon="@drawable/sym_keyboard_space" - android:iconPreview="@drawable/sym_keyboard_feedback_space" - android:keyWidth="30%p" - android:isModifier="true" /> - <Key - android:keyLabel="." - android:keyIcon="@drawable/hint_popup" - android:popupKeyboard="@xml/popup_punctuation" - android:isModifier="true" /> - <Key - android:codes="@integer/key_return" - android:keyIcon="@drawable/sym_keyboard_return" - android:iconPreview="@drawable/sym_keyboard_feedback_return" - android:keyWidth="25%p" - android:isModifier="true" - android:keyEdgeFlags="right" /> - </Row> - <Row - android:keyboardMode="@+id/mode_email_with_settings_key" - android:rowEdgeFlags="bottom" - > - <Key - android:codes="@integer/key_symbol" - android:keyLabel="@string/label_symbol_key" - android:keyWidth="15%p" - android:isModifier="true" - android:keyEdgeFlags="left" /> - <Key - android:codes="@integer/key_settings" - android:keyIcon="@drawable/sym_keyboard_settings" - android:iconPreview="@drawable/sym_keyboard_feedback_settings" - android:isModifier="true" /> - <Key - android:codes="@integer/key_f1" - android:isModifier="true" /> - <Key - android:codes="@integer/key_space" - android:keyIcon="@drawable/sym_keyboard_space" - android:iconPreview="@drawable/sym_keyboard_feedback_space" - android:keyWidth="30%p" - android:isModifier="true" /> - <Key - android:keyLabel="." - android:keyIcon="@drawable/hint_popup" - android:popupKeyboard="@xml/popup_punctuation" - android:isModifier="true" /> - <Key - android:codes="@integer/key_return" - android:keyIcon="@drawable/sym_keyboard_return" - android:iconPreview="@drawable/sym_keyboard_feedback_return" - android:keyWidth="25%p" - android:isModifier="true" - android:keyEdgeFlags="right" /> - </Row> - <Row - android:keyboardMode="@+id/mode_im_with_settings_key" - android:rowEdgeFlags="bottom" - > - <Key - android:codes="@integer/key_symbol" - android:keyLabel="@string/label_symbol_key" - android:keyWidth="15%p" - android:isModifier="true" - android:keyEdgeFlags="left" /> - <Key - android:codes="@integer/key_settings" - android:keyIcon="@drawable/sym_keyboard_settings" - android:iconPreview="@drawable/sym_keyboard_feedback_settings" - android:isModifier="true" /> - <Key - android:codes="@integer/key_f1" - android:isModifier="true" /> - <Key - android:codes="@integer/key_space" - android:keyIcon="@drawable/sym_keyboard_space" - android:iconPreview="@drawable/sym_keyboard_feedback_space" - android:keyWidth="30%p" - android:isModifier="true" /> - <Key - android:keyLabel="." - android:keyIcon="@drawable/hint_popup" - android:popupKeyboard="@xml/popup_punctuation" - android:isModifier="true" /> - <Key - android:keyLabel=":-)" - android:keyOutputText=":-) " - android:keyIcon="@drawable/hint_popup" - android:popupKeyboard="@xml/popup_smileys" - android:keyWidth="25%p" - android:isModifier="true" - android:keyEdgeFlags="right" /> - </Row> - <Row - android:keyboardMode="@+id/mode_webentry_with_settings_key" - android:rowEdgeFlags="bottom" - > - <Key - android:codes="@integer/key_symbol" - android:keyLabel="@string/label_symbol_key" - android:keyWidth="15%p" - android:isModifier="true" - android:keyEdgeFlags="left" /> - <Key - android:codes="@integer/key_settings" - android:keyIcon="@drawable/sym_keyboard_settings" - android:iconPreview="@drawable/sym_keyboard_feedback_settings" - android:isModifier="true" /> - <Key - android:codes="@integer/key_f1" - android:isModifier="true" /> - <Key - android:codes="@integer/key_space" - android:keyIcon="@drawable/sym_keyboard_space" - android:iconPreview="@drawable/sym_keyboard_feedback_space" - android:keyWidth="30%p" - android:isModifier="true" /> - <Key - android:codes="@integer/key_tab" - android:keyIcon="@drawable/sym_keyboard_tab" - android:iconPreview="@drawable/sym_keyboard_feedback_tab" - android:isModifier="true" /> - <Key - android:keyLabel="." - android:keyIcon="@drawable/hint_popup" - android:popupKeyboard="@xml/popup_punctuation" - android:isModifier="true" /> - <Key - android:codes="@integer/key_return" - android:keyIcon="@drawable/sym_keyboard_return" - android:iconPreview="@drawable/sym_keyboard_feedback_return" - android:keyWidth="15%p" - android:isModifier="true" - android:keyEdgeFlags="right" /> - </Row> + <include + latin:keyboardLayout="@xml/kbd_rows_qwerty" /> </Keyboard> diff --git a/java/res/xml/kbd_qwerty_black.xml b/java/res/xml/kbd_qwerty_black.xml deleted file mode 100644 index 787e4ef7c..000000000 --- a/java/res/xml/kbd_qwerty_black.xml +++ /dev/null @@ -1,447 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -/* -** -** Copyright 2008, 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:android="http://schemas.android.com/apk/res/android" - android:keyWidth="10%p" - android:horizontalGap="0px" - android:verticalGap="@dimen/key_bottom_gap" - android:keyHeight="@dimen/key_height" -> - <Row - android:rowEdgeFlags="top" - > - <Key - android:keyLabel="q" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="@string/alternates_for_q" - android:keyEdgeFlags="left" /> - <Key - android:keyLabel="w" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="@string/alternates_for_w" /> - <Key - android:keyLabel="e" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="@string/alternates_for_e" /> - <Key - android:keyLabel="r" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="@string/alternates_for_r" /> - <Key - android:keyLabel="t" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="@string/alternates_for_t" /> - <Key - android:keyLabel="y" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="@string/alternates_for_y" /> - <Key - android:keyLabel="u" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="@string/alternates_for_u" /> - <Key - android:keyLabel="i" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="@string/alternates_for_i" /> - <Key - android:keyLabel="o" - android:popupKeyboard="@xml/kbd_popup_narrow_template" - android:popupCharacters="@string/alternates_for_o" /> - <Key - android:keyLabel="p" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="@string/alternates_for_p" - android:keyEdgeFlags="right" /> - </Row> - <Row> - <Key - android:keyLabel="a" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="@string/alternates_for_a" - android:horizontalGap="5%p" - android:keyEdgeFlags="left" /> - <Key - android:keyLabel="s" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="@string/alternates_for_s" /> - <Key - android:keyLabel="d" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="@string/alternates_for_d" /> - <Key - android:keyLabel="f" /> - <Key - android:keyLabel="g" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="@string/alternates_for_g" /> - <Key - android:keyLabel="h" /> - <Key - android:keyLabel="j" /> - <Key - android:keyLabel="k" /> - <Key - android:keyLabel="l" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="@string/alternates_for_l" - android:keyEdgeFlags="right" /> - </Row> - <Row> - <Key - android:codes="@integer/key_shift" - android:keyIcon="@drawable/sym_bkeyboard_shift" - android:iconPreview="@drawable/sym_keyboard_feedback_shift" - android:keyWidth="15%p" - android:isModifier="true" - android:isSticky="true" - android:keyEdgeFlags="left" /> - <Key - android:keyLabel="z" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="@string/alternates_for_z" /> - <Key - android:keyLabel="x" /> - <Key - android:keyLabel="c" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="@string/alternates_for_c" /> - <Key - android:keyLabel="v" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="@string/alternates_for_v" /> - <Key - android:keyLabel="b" /> - <Key - android:keyLabel="n" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="@string/alternates_for_n" /> - <Key - android:keyLabel="m" /> - <Key - android:codes="@integer/key_delete" - android:keyIcon="@drawable/sym_bkeyboard_delete" - android:iconPreview="@drawable/sym_keyboard_feedback_delete" - android:keyWidth="15%p" - android:isRepeatable="true" - android:keyEdgeFlags="right" /> - </Row> - <Row - android:keyboardMode="@+id/mode_normal" - android:rowEdgeFlags="bottom" - > - <Key - android:codes="@integer/key_symbol" - android:keyLabel="@string/label_symbol_key" - android:keyWidth="20%p" - android:keyEdgeFlags="left" /> - <Key - android:codes="@integer/key_f1" /> - <Key - android:codes="@integer/key_space" - android:keyIcon="@drawable/sym_bkeyboard_space" - android:iconPreview="@drawable/sym_keyboard_feedback_space" - android:keyWidth="40%p" /> - <Key - android:keyLabel="." - android:keyIcon="@drawable/hint_popup" - android:popupKeyboard="@xml/popup_punctuation" /> - <Key - android:codes="@integer/key_return" - android:keyIcon="@drawable/sym_bkeyboard_return" - android:iconPreview="@drawable/sym_keyboard_feedback_return" - android:keyWidth="20%p" - android:keyEdgeFlags="right" /> - </Row> - <Row - android:keyboardMode="@+id/mode_url" - android:rowEdgeFlags="bottom" - > - <Key - android:codes="@integer/key_symbol" - android:keyLabel="@string/label_symbol_key" - android:keyWidth="20%p" - android:keyEdgeFlags="left" /> - <Key - android:codes="@integer/key_f1" /> - <Key - android:codes="@integer/key_space" - android:keyIcon="@drawable/sym_bkeyboard_space" - android:iconPreview="@drawable/sym_keyboard_feedback_space" - android:keyWidth="40%p" /> - <Key - android:keyLabel="." - android:keyIcon="@drawable/hint_popup" - android:popupKeyboard="@xml/popup_punctuation" /> - <Key - android:codes="@integer/key_return" - android:keyIcon="@drawable/sym_bkeyboard_return" - android:iconPreview="@drawable/sym_keyboard_feedback_return" - android:keyWidth="20%p" - android:keyEdgeFlags="right" /> - </Row> - <Row - android:keyboardMode="@+id/mode_email" - android:rowEdgeFlags="bottom" - > - <Key - android:codes="@integer/key_symbol" - android:keyLabel="@string/label_symbol_key" - android:keyWidth="20%p" - android:keyEdgeFlags="left" /> - <Key - android:codes="@integer/key_f1" /> - <Key - android:codes="@integer/key_space" - android:keyIcon="@drawable/sym_bkeyboard_space" - android:iconPreview="@drawable/sym_keyboard_feedback_space" - android:keyWidth="40%p" /> - <Key - android:keyLabel="." - android:keyIcon="@drawable/hint_popup" - android:popupKeyboard="@xml/popup_punctuation" /> - <Key - android:codes="@integer/key_return" - android:keyIcon="@drawable/sym_bkeyboard_return" - android:iconPreview="@drawable/sym_keyboard_feedback_return" - android:keyWidth="20%p" - android:keyEdgeFlags="right" /> - </Row> - <Row - android:keyboardMode="@+id/mode_im" - android:rowEdgeFlags="bottom" - > - <Key - android:codes="@integer/key_symbol" - android:keyLabel="@string/label_symbol_key" - android:keyWidth="20%p" - android:keyEdgeFlags="left" /> - <Key - android:codes="@integer/key_f1" /> - <Key - android:codes="@integer/key_space" - android:keyIcon="@drawable/sym_bkeyboard_space" - android:iconPreview="@drawable/sym_keyboard_feedback_space" - android:keyWidth="40%p" /> - <Key - android:keyLabel="." - android:keyIcon="@drawable/hint_popup" - android:popupKeyboard="@xml/popup_punctuation" /> - <Key - android:keyLabel=":-)" - android:keyOutputText=":-) " - android:keyIcon="@drawable/hint_popup" - android:popupKeyboard="@xml/popup_smileys" - android:keyWidth="20%p" - android:keyEdgeFlags="right" /> - </Row> - <Row - android:keyboardMode="@+id/mode_webentry" - android:rowEdgeFlags="bottom" - > - <Key - android:codes="@integer/key_symbol" - android:keyLabel="@string/label_symbol_key" - android:keyWidth="20%p" - android:keyEdgeFlags="left" /> - <Key - android:codes="@integer/key_f1" /> - <Key - android:codes="@integer/key_space" - android:keyIcon="@drawable/sym_bkeyboard_space" - android:iconPreview="@drawable/sym_keyboard_feedback_space" - android:keyWidth="20%p" /> - <Key - android:codes="@integer/key_tab" - android:keyIcon="@drawable/sym_bkeyboard_tab" - android:iconPreview="@drawable/sym_keyboard_feedback_tab" - android:keyWidth="20%p" /> - <Key - android:keyLabel="." - android:keyIcon="@drawable/hint_popup" - android:popupKeyboard="@xml/popup_punctuation" /> - <Key - android:codes="@integer/key_return" - android:keyIcon="@drawable/sym_bkeyboard_return" - android:iconPreview="@drawable/sym_keyboard_feedback_return" - android:keyWidth="20%p" - android:keyEdgeFlags="right" /> - </Row> - <Row - android:keyboardMode="@+id/mode_normal_with_settings_key" - android:rowEdgeFlags="bottom" - > - <Key - android:codes="@integer/key_symbol" - android:keyLabel="@string/label_symbol_key" - android:keyWidth="15%p" - android:keyEdgeFlags="left" /> - <Key - android:codes="@integer/key_settings" - android:keyIcon="@drawable/sym_bkeyboard_settings" - android:iconPreview="@drawable/sym_keyboard_feedback_settings" /> - <Key - android:codes="@integer/key_f1" /> - <Key - android:codes="@integer/key_space" - android:keyIcon="@drawable/sym_bkeyboard_space" - android:iconPreview="@drawable/sym_keyboard_feedback_space" - android:keyWidth="30%p" /> - <Key - android:keyLabel="." - android:keyIcon="@drawable/hint_popup" - android:popupKeyboard="@xml/popup_punctuation" /> - <Key - android:codes="@integer/key_return" - android:keyIcon="@drawable/sym_bkeyboard_return" - android:iconPreview="@drawable/sym_keyboard_feedback_return" - android:keyWidth="25%p" - android:keyEdgeFlags="right" /> - </Row> - <Row - android:keyboardMode="@+id/mode_url_with_settings_key" - android:rowEdgeFlags="bottom" - > - <Key - android:codes="@integer/key_symbol" - android:keyLabel="@string/label_symbol_key" - android:keyWidth="15%p" - android:keyEdgeFlags="left" /> - <Key - android:codes="@integer/key_settings" - android:keyIcon="@drawable/sym_bkeyboard_settings" - android:iconPreview="@drawable/sym_keyboard_feedback_settings" /> - <Key - android:codes="@integer/key_f1" /> - <Key - android:codes="@integer/key_space" - android:keyIcon="@drawable/sym_bkeyboard_space" - android:iconPreview="@drawable/sym_keyboard_feedback_space" - android:keyWidth="30%p" /> - <Key - android:keyLabel="." - android:keyIcon="@drawable/hint_popup" - android:popupKeyboard="@xml/popup_punctuation" /> - <Key - android:codes="@integer/key_return" - android:keyIcon="@drawable/sym_bkeyboard_return" - android:iconPreview="@drawable/sym_keyboard_feedback_return" - android:keyWidth="25%p" - android:keyEdgeFlags="right" /> - </Row> - <Row - android:keyboardMode="@+id/mode_email_with_settings_key" - android:rowEdgeFlags="bottom" - > - <Key - android:codes="@integer/key_symbol" - android:keyLabel="@string/label_symbol_key" - android:keyWidth="15%p" - android:keyEdgeFlags="left" /> - <Key - android:codes="@integer/key_settings" - android:keyIcon="@drawable/sym_bkeyboard_settings" - android:iconPreview="@drawable/sym_keyboard_feedback_settings" /> - <Key - android:codes="@integer/key_f1" /> - <Key - android:codes="@integer/key_space" - android:keyIcon="@drawable/sym_bkeyboard_space" - android:iconPreview="@drawable/sym_keyboard_feedback_space" - android:keyWidth="30%p" /> - <Key - android:keyLabel="." - android:keyIcon="@drawable/hint_popup" - android:popupKeyboard="@xml/popup_punctuation" /> - <Key - android:codes="@integer/key_return" - android:keyIcon="@drawable/sym_bkeyboard_return" - android:iconPreview="@drawable/sym_keyboard_feedback_return" - android:keyWidth="25%p" - android:keyEdgeFlags="right" /> - </Row> - <Row - android:keyboardMode="@+id/mode_im_with_settings_key" - android:rowEdgeFlags="bottom" - > - <Key - android:codes="@integer/key_symbol" - android:keyLabel="@string/label_symbol_key" - android:keyWidth="15%p" - android:keyEdgeFlags="left" /> - <Key - android:codes="@integer/key_settings" - android:keyIcon="@drawable/sym_bkeyboard_settings" - android:iconPreview="@drawable/sym_keyboard_feedback_settings" /> - <Key - android:codes="@integer/key_f1" /> - <Key - android:codes="@integer/key_space" - android:keyIcon="@drawable/sym_bkeyboard_space" - android:iconPreview="@drawable/sym_keyboard_feedback_space" - android:keyWidth="30%p" /> - <Key - android:keyLabel="." - android:keyIcon="@drawable/hint_popup" - android:popupKeyboard="@xml/popup_punctuation" /> - <Key - android:keyLabel=":-)" - android:keyOutputText=":-) " - android:keyIcon="@drawable/hint_popup" - android:popupKeyboard="@xml/popup_smileys" - android:keyWidth="25%p" - android:keyEdgeFlags="right" /> - </Row> - <Row - android:keyboardMode="@+id/mode_webentry_with_settings_key" - android:rowEdgeFlags="bottom" - > - <Key - android:codes="@integer/key_symbol" - android:keyLabel="@string/label_symbol_key" - android:keyWidth="15%p" - android:keyEdgeFlags="left" /> - <Key - android:codes="@integer/key_settings" - android:keyIcon="@drawable/sym_bkeyboard_settings" - android:iconPreview="@drawable/sym_keyboard_feedback_settings" /> - <Key - android:codes="@integer/key_f1" /> - <Key - android:codes="@integer/key_space" - android:keyIcon="@drawable/sym_bkeyboard_space" - android:iconPreview="@drawable/sym_keyboard_feedback_space" - android:keyWidth="30%p" /> - <Key - android:codes="@integer/key_tab" - android:keyIcon="@drawable/sym_bkeyboard_tab" - android:iconPreview="@drawable/sym_keyboard_feedback_tab" /> - <Key - android:keyLabel="." - android:keyIcon="@drawable/hint_popup" - android:popupKeyboard="@xml/popup_punctuation" /> - <Key - android:codes="@integer/key_return" - android:keyIcon="@drawable/sym_bkeyboard_return" - android:iconPreview="@drawable/sym_keyboard_feedback_return" - android:keyWidth="15%p" - android:keyEdgeFlags="right" /> - </Row> -</Keyboard> diff --git a/java/res/xml/kbd_qwerty_f1.xml b/java/res/xml/kbd_qwerty_f1.xml new file mode 100644 index 000000000..51b9800e0 --- /dev/null +++ b/java/res/xml/kbd_qwerty_f1.xml @@ -0,0 +1,116 @@ +<?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="true" + > + <switch> + <case + latin:mode="url" + > + <Key + latin:keyLabel="/" + latin:keyWidth="9.2%p" + latin:keyStyle="settingsPopupStyle" /> + </case> + <case + latin:mode="email" + > + <Key + latin:keyLabel="\@" + latin:keyWidth="9.2%p" + latin:keyStyle="settingsPopupStyle" /> + </case> + <default> + <switch> + <case + latin:hasVoiceKey="true" + > + <Key + latin:keyStyle="shortcutKeyStyle" + latin:keyWidth="9.2%p" /> + </case> + <!-- latin:hasVoiceKey="false" --> + <case + latin:navigateAction="true" + > + <Key + latin:keyLabel="." + latin:keyWidth="9.2%p" + latin:keyStyle="settingsPopupStyle" /> + </case> + <default> + <Key + latin:keyLabel="," + latin:keyWidth="9.2%p" + latin:keyStyle="settingsPopupStyle" /> + </default> + </switch> + </default> + </switch> + </case> + <!-- hasSettingsKey="false" --> + <default> + <switch> + <case + latin:mode="url" + > + <Key + latin:keyLabel="/" + latin:keyStyle="settingsPopupStyle" /> + </case> + <case + latin:mode="email" + > + <Key + latin:keyLabel="\@" + latin:keyStyle="settingsPopupStyle" /> + </case> + <default> + <switch> + <case + latin:hasVoiceKey="true" + > + <Key + latin:keyStyle="shortcutKeyStyle" /> + </case> + <!-- latin:hasVoiceKey="false" --> + <case + latin:navigateAction="true" + > + <Key + latin:keyLabel="." + latin:keyStyle="settingsPopupStyle" /> + </case> + <default> + <Key + latin:keyLabel="," + latin:keyStyle="settingsPopupStyle" /> + </default> + </switch> + </default> + </switch> + </default> + </switch> +</merge> diff --git a/java/res/xml/kbd_qwerty_row1.xml b/java/res/xml/kbd_qwerty_row1.xml new file mode 100644 index 000000000..8c3669de0 --- /dev/null +++ b/java/res/xml/kbd_qwerty_row1.xml @@ -0,0 +1,72 @@ +<?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" +> + <Row + latin:keyWidth="10%p" + latin:rowEdgeFlags="top" + > + <Key + latin:keyLabel="q" + latin:keyHintLetter="1" + latin:popupCharacters="@string/alternates_for_q" + latin:keyEdgeFlags="left" /> + <Key + latin:keyLabel="w" + latin:keyHintLetter="2" + latin:popupCharacters="@string/alternates_for_w" /> + <Key + latin:keyLabel="e" + latin:keyHintLetter="3" + latin:popupCharacters="@string/alternates_for_e" /> + <Key + latin:keyLabel="r" + latin:keyHintLetter="4" + latin:popupCharacters="@string/alternates_for_r" /> + <Key + latin:keyLabel="t" + latin:keyHintLetter="5" + latin:popupCharacters="@string/alternates_for_t" /> + <Key + latin:keyLabel="y" + latin:keyHintLetter="6" + latin:popupCharacters="@string/alternates_for_y" /> + <Key + latin:keyLabel="u" + latin:keyHintLetter="7" + latin:popupCharacters="@string/alternates_for_u" /> + <Key + latin:keyLabel="i" + latin:keyHintLetter="8" + latin:popupCharacters="@string/alternates_for_i" /> + <Key + latin:keyLabel="o" + latin:keyHintLetter="9" + latin:popupCharacters="@string/alternates_for_o" /> + <Key + latin:keyLabel="p" + latin:keyHintLetter="0" + latin:popupCharacters="@string/alternates_for_p" + latin:keyWidth="fillRight" + latin:keyEdgeFlags="right" /> + </Row> +</merge> diff --git a/java/res/xml/kbd_qwerty_row2.xml b/java/res/xml/kbd_qwerty_row2.xml new file mode 100644 index 000000000..57bbad75a --- /dev/null +++ b/java/res/xml/kbd_qwerty_row2.xml @@ -0,0 +1,56 @@ +<?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" +> + <Row + latin:keyWidth="10%p" + > + <Key + latin:keyLabel="a" + latin:popupCharacters="@string/alternates_for_a" + latin:keyXPos="5%p" + latin:keyEdgeFlags="left" /> + <Key + latin:keyLabel="s" + latin:popupCharacters="@string/alternates_for_s" /> + <Key + latin:keyLabel="d" + latin:popupCharacters="@string/alternates_for_d" /> + <Key + latin:keyLabel="f" /> + <Key + latin:keyLabel="g" + latin:popupCharacters="@string/alternates_for_g" /> + <Key + latin:keyLabel="h" /> + <Key + latin:keyLabel="j" /> + <Key + latin:keyLabel="k" + latin:popupCharacters="@string/alternates_for_k" /> + <Key + latin:keyLabel="l" + latin:popupCharacters="@string/alternates_for_l" + latin:keyEdgeFlags="right" /> + <!-- Here is 5%p space --> + </Row> +</merge> diff --git a/java/res/xml/kbd_qwerty_row3.xml b/java/res/xml/kbd_qwerty_row3.xml new file mode 100644 index 000000000..98f0404c0 --- /dev/null +++ b/java/res/xml/kbd_qwerty_row3.xml @@ -0,0 +1,56 @@ +<?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" +> + <Row + latin:keyWidth="10%p" + > + <Key + latin:keyStyle="shiftKeyStyle" + latin:keyWidth="15%p" + latin:visualInsetsRight="1%p" + latin:keyEdgeFlags="left" /> + <Key + latin:keyLabel="z" + latin:popupCharacters="@string/alternates_for_z" /> + <Key + latin:keyLabel="x" /> + <Key + latin:keyLabel="c" + latin:popupCharacters="@string/alternates_for_c" /> + <Key + latin:keyLabel="v" + latin:popupCharacters="@string/alternates_for_v" /> + <Key + latin:keyLabel="b" /> + <Key + latin:keyLabel="n" + latin:popupCharacters="@string/alternates_for_n" /> + <Key + latin:keyLabel="m" /> + <Key + latin:keyStyle="deleteKeyStyle" + latin:keyWidth="fillBoth" + latin:visualInsetsLeft="1%p" + latin:keyEdgeFlags="right" /> + </Row> +</merge> diff --git a/java/res/xml/kbd_qwerty_row4.xml b/java/res/xml/kbd_qwerty_row4.xml new file mode 100644 index 000000000..095133929 --- /dev/null +++ b/java/res/xml/kbd_qwerty_row4.xml @@ -0,0 +1,115 @@ +<?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" +> + <Row + latin:keyWidth="10%p" + latin:rowEdgeFlags="bottom" + > + <switch> + <case + latin:hasSettingsKey="true" + > + <Key + latin:keyStyle="toSymbolKeyStyle" + latin:keyWidth="13.75%p" + latin:keyEdgeFlags="left" /> + <Key + latin:keyStyle="settingsKeyStyle" + latin:keyWidth="9.2%p" /> + <include + latin:keyboardLayout="@xml/kbd_qwerty_f1" /> + <Key + latin:keyStyle="spaceKeyStyle" + latin:keyWidth="35.83%p" /> + <switch> + <case + latin:navigateAction="true" + > + <Key + latin:keyStyle="tabKeyStyle" + latin:keyLabelOption="popupHint" + latin:popupCharacters="@string/alternates_for_web_tab_punctuation" + latin:keyWidth="9.2%p" + latin:maxPopupKeyboardColumn="8" /> + </case> + <default> + <Key + latin:keyLabel="." + latin:keyLabelOption="popupHint" + latin:popupCharacters="@string/alternates_for_punctuation" + latin:keyWidth="9.2%p" + latin:maxPopupKeyboardColumn="7" + latin:keyStyle="functionalKeyStyle" /> + </default> + </switch> + </case> + <!-- latin:hasSettingsKey="false" --> + <default> + <Key + latin:keyStyle="toSymbolKeyStyle" + latin:keyWidth="15%p" + latin:keyEdgeFlags="left" /> + <include + latin:keyboardLayout="@xml/kbd_qwerty_f1" /> + <Key + latin:keyStyle="spaceKeyStyle" + latin:keyWidth="50%p" /> + <switch> + <case + latin:navigateAction="true" + > + <Key + latin:keyStyle="tabKeyStyle" + latin:keyLabelOption="popupHint" + latin:popupCharacters="@string/alternates_for_web_tab_punctuation" + latin:maxPopupKeyboardColumn="8" /> + </case> + <default> + <Key + latin:keyLabel="." + latin:keyLabelOption="popupHint" + latin:popupCharacters="@string/alternates_for_punctuation" + latin:maxPopupKeyboardColumn="7" + latin:keyStyle="functionalKeyStyle" /> + </default> + </switch> + </default> + </switch> + <switch> + <case + latin:mode="im" + > + <Key + latin:keyStyle="smileyKeyStyle" + latin:keyWidth="fillRight" + latin:keyEdgeFlags="right" /> + </case> + <default> + <Key + latin:keyStyle="returnKeyStyle" + latin:keyWidth="fillRight" + latin:keyEdgeFlags="right" /> + </default> + </switch> + </Row> +</merge> diff --git a/java/res/xml/kbd_rows_arabic.xml b/java/res/xml/kbd_rows_arabic.xml new file mode 100644 index 000000000..a548775a4 --- /dev/null +++ b/java/res/xml/kbd_rows_arabic.xml @@ -0,0 +1,122 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** +** Copyright 2011, 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. +*/ +--> + +<!-- This file for Arabic layout is an alpha version. It allows to enter --> +<!-- some right-to-left text, but it has gone through no study whatsoever, --> +<!-- and needs to be run through UX. --> +<merge + xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" +> + <include + latin:keyboardLayout="@xml/kbd_key_styles" /> + <Row + latin:keyWidth="10%p" + > + <Key + latin:keyLabel="ض" + latin:keyEdgeFlags="left" /> + <Key + latin:keyLabel="ص" /> + <Key + latin:keyLabel="ق" /> + <Key + latin:keyLabel="ف" + latin:popupCharacters="ڤ" /> + <Key + latin:keyLabel="غ" /> + <Key + latin:keyLabel="ع" /> + <Key + latin:keyLabel="ه" + latin:popupCharacters="هـ" /> + <Key + latin:keyLabel="خ" /> + <Key + latin:keyLabel="ح" /> + <Key + latin:keyLabel="ج" + latin:popupCharacters="چ" + latin:keyWidth="fillRight" + latin:keyEdgeFlags="right" /> + </Row> + <Row + latin:keyWidth="10%p" + > + <Key + latin:keyLabel="ش" + latin:keyEdgeFlags="left" /> + <Key + latin:keyLabel="س" /> + <Key + latin:keyLabel="ي" + latin:popupCharacters="ى,ئ" /> + <Key + latin:keyLabel="ب" + latin:popupCharacters="پ" /> + <Key + latin:keyLabel="ل" + latin:popupCharacters="لا" /> + <Key + latin:keyLabel="ا" + latin:popupCharacters="أ,إ,آ,ء" /> + <Key + latin:keyLabel="ت" /> + <Key + latin:keyLabel="ن" /> + <Key + latin:keyLabel="م" /> + <Key + latin:keyLabel="ك" + latin:popupCharacters="گ" + latin:keyWidth="fillRight" + latin:keyEdgeFlags="right" /> + </Row> + <Row + latin:keyWidth="9.7%p" + > + <Key + latin:keyLabel="ظ" + latin:keyEdgeFlags="left" /> + <Key + latin:keyLabel="ط" /> + <Key + latin:keyLabel="ذ" /> + <Key + latin:keyLabel="د" /> + <Key + latin:keyLabel="ز" + latin:popupCharacters="ژ" /> + <Key + latin:keyLabel="ر" /> + <Key + latin:keyLabel="و" + latin:popupCharacters="ؤ" /> + <Key + latin:keyLabel="ة" /> + <Key + latin:keyLabel="ث" /> + <Key + latin:keyStyle="deleteKeyStyle" + latin:keyWidth="fillRight" + latin:visualInsetsLeft="1%p" + latin:keyEdgeFlags="right" /> + </Row> + <include latin:keyboardLayout="@xml/kbd_qwerty_row4" /> +</merge> diff --git a/java/res/xml/kbd_rows_azerty.xml b/java/res/xml/kbd_rows_azerty.xml new file mode 100644 index 000000000..9825c4a10 --- /dev/null +++ b/java/res/xml/kbd_rows_azerty.xml @@ -0,0 +1,143 @@ +<?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" +> + <include + latin:keyboardLayout="@xml/kbd_key_styles" /> + <Row + latin:keyWidth="10%p" + latin:rowEdgeFlags="top" + > + <Key + latin:keyLabel="a" + latin:keyHintLetter="1" + latin:popupCharacters="@string/alternates_for_a" + latin:keyEdgeFlags="left" /> + <Key + latin:keyLabel="z" + latin:keyHintLetter="2" + latin:popupCharacters="@string/alternates_for_z" /> + <Key + latin:keyLabel="e" + latin:keyHintLetter="3" + latin:popupCharacters="@string/alternates_for_e" /> + <Key + latin:keyLabel="r" + latin:keyHintLetter="4" + latin:popupCharacters="@string/alternates_for_r" /> + <Key + latin:keyLabel="t" + latin:keyHintLetter="5" + latin:popupCharacters="@string/alternates_for_t" /> + <Key + latin:keyLabel="y" + latin:keyHintLetter="6" + latin:popupCharacters="@string/alternates_for_y" /> + <Key + latin:keyLabel="u" + latin:keyHintLetter="7" + latin:popupCharacters="@string/alternates_for_u" /> + <Key + latin:keyLabel="i" + latin:keyHintLetter="8" + latin:popupCharacters="@string/alternates_for_i" /> + <Key + latin:keyLabel="o" + latin:keyHintLetter="9" + latin:popupCharacters="@string/alternates_for_o" /> + <Key + latin:keyLabel="p" + latin:keyHintLetter="0" + latin:popupCharacters="@string/alternates_for_p" + latin:keyWidth="fillRight" + latin:keyEdgeFlags="right" /> + </Row> + <Row + latin:keyWidth="10%p" + > + <Key + latin:keyLabel="q" + latin:popupCharacters="@string/alternates_for_q" + latin:keyEdgeFlags="left" /> + <Key + latin:keyLabel="s" + latin:popupCharacters="@string/alternates_for_s" /> + <Key + latin:keyLabel="d" + latin:popupCharacters="@string/alternates_for_d" /> + <Key + latin:keyLabel="f" /> + <Key + latin:keyLabel="g" + latin:popupCharacters="@string/alternates_for_g" /> + <Key + latin:keyLabel="h" /> + <Key + latin:keyLabel="j" /> + <Key + latin:keyLabel="k" + latin:popupCharacters="@string/alternates_for_k" /> + <Key + latin:keyLabel="l" + latin:popupCharacters="@string/alternates_for_l" /> + <Key + latin:keyLabel="m" + latin:keyWidth="fillRight" + latin:keyEdgeFlags="right" /> + </Row> + <Row + latin:keyWidth="10%p" + > + <Key + latin:keyStyle="shiftKeyStyle" + latin:keyWidth="15%p" + latin:visualInsetsRight="1%p" + latin:keyEdgeFlags="left" /> + <Key + latin:keyLabel="w" + latin:popupCharacters="@string/alternates_for_w" /> + <Key + latin:keyLabel="x" /> + <Key + latin:keyLabel="c" + + latin:popupCharacters="@string/alternates_for_c" /> + <Key + latin:keyLabel="v" + latin:popupCharacters="@string/alternates_for_v" /> + <Key + latin:keyLabel="b" /> + <Key + latin:keyLabel="n" + latin:popupCharacters="@string/alternates_for_n" /> + <Key + latin:keyLabel="\'" + latin:popupCharacters="‘,’,‚,‛" /> + <Key + latin:keyStyle="deleteKeyStyle" + latin:keyWidth="fillRight" + latin:visualInsetsLeft="1%p" + latin:keyEdgeFlags="right" /> + </Row> + <include + latin:keyboardLayout="@xml/kbd_qwerty_row4" /> +</merge> diff --git a/java/res/xml/kbd_rows_hebrew.xml b/java/res/xml/kbd_rows_hebrew.xml new file mode 100644 index 000000000..c3c8f7d3e --- /dev/null +++ b/java/res/xml/kbd_rows_hebrew.xml @@ -0,0 +1,111 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** +** Copyright 2011, 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. +*/ +--> + +<!-- This file for Hebrew layout is an alpha version. It allows to enter --> +<!-- some right-to-left text, but it has gone through no study whatsoever, --> +<!-- and needs to be run through UX. --> +<merge + xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" +> + <include + latin:keyboardLayout="@xml/kbd_key_styles" /> + <Row + latin:keyWidth="10%p" + latin:rowEdgeFlags="top" + > + <Key + latin:keyLabel="ק" + latin:keyXPos="5%p" + latin:keyEdgeFlags="left" /> + <Key + latin:keyLabel="ר" /> + <Key + latin:keyLabel="א" /> + <Key + latin:keyLabel="ט" /> + <Key + latin:keyLabel="ו" /> + <Key + latin:keyLabel="ן" /> + <Key + latin:keyLabel="ם" /> + <Key + latin:keyLabel="פ" /> + <Key + latin:keyStyle="deleteKeyStyle" + latin:keyWidth="fillRight" + latin:visualInsetsLeft="1%p" + latin:keyEdgeFlags="right" /> + </Row> + <Row + latin:keyWidth="10%p" + > + <Key + latin:keyLabel="ש" + latin:keyEdgeFlags="left" /> + <Key + latin:keyLabel="ד" /> + <Key + latin:keyLabel="ג" /> + <Key + latin:keyLabel="כ" /> + <Key + latin:keyLabel="ע" /> + <Key + latin:keyLabel="י" /> + <Key + latin:keyLabel="ח" /> + <Key + latin:keyLabel="ל" /> + <Key + latin:keyLabel="ך" /> + <Key + latin:keyLabel="ף" + latin:keyWidth="fillRight" + latin:keyEdgeFlags="right" /> + </Row> + <Row + latin:keyWidth="10%p" + > + <Key + latin:keyLabel="ז" + latin:keyXPos="5%p" + latin:keyEdgeFlags="left" /> + <Key + latin:keyLabel="ס" /> + <Key + latin:keyLabel="ב" /> + <Key + latin:keyLabel="ה" /> + <Key + latin:keyLabel="נ" /> + <Key + latin:keyLabel="מ" /> + <Key + latin:keyLabel="צ" /> + <Key + latin:keyLabel="ת" /> + <Key + latin:keyLabel="ץ" + latin:keyEdgeFlags="right" /> + <!-- Here is 5%p space --> + </Row> + <include latin:keyboardLayout="@xml/kbd_qwerty_row4" /> +</merge> diff --git a/java/res/xml/dictionary.xml b/java/res/xml/kbd_rows_qwerty.xml index 7b770a8b4..6237712f6 100644 --- a/java/res/xml/dictionary.xml +++ b/java/res/xml/kbd_rows_qwerty.xml @@ -18,6 +18,17 @@ */ --> -<dictionary> - <part name = "main" /> -</dictionary>
\ No newline at end of file +<merge + xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" +> + <include + latin:keyboardLayout="@xml/kbd_key_styles" /> + <include + latin:keyboardLayout="@xml/kbd_qwerty_row1" /> + <include + latin:keyboardLayout="@xml/kbd_qwerty_row2" /> + <include + latin:keyboardLayout="@xml/kbd_qwerty_row3" /> + <include + latin:keyboardLayout="@xml/kbd_qwerty_row4" /> +</merge> diff --git a/java/res/xml/kbd_rows_qwertz.xml b/java/res/xml/kbd_rows_qwertz.xml new file mode 100644 index 000000000..0d70b2637 --- /dev/null +++ b/java/res/xml/kbd_rows_qwertz.xml @@ -0,0 +1,110 @@ +<?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" +> + <include + latin:keyboardLayout="@xml/kbd_key_styles" /> + <Row + latin:keyWidth="10%p" + latin:rowEdgeFlags="top" + > + <Key + latin:keyLabel="q" + latin:keyHintLetter="1" + latin:popupCharacters="@string/alternates_for_q" + latin:keyEdgeFlags="left" /> + <Key + latin:keyLabel="w" + latin:keyHintLetter="2" + latin:popupCharacters="@string/alternates_for_w" /> + <Key + latin:keyLabel="e" + latin:keyHintLetter="3" + latin:popupCharacters="@string/alternates_for_e" /> + <Key + latin:keyLabel="r" + latin:keyHintLetter="4" + latin:popupCharacters="@string/alternates_for_r" /> + <Key + latin:keyLabel="t" + latin:keyHintLetter="5" + latin:popupCharacters="@string/alternates_for_t" /> + <Key + latin:keyLabel="z" + latin:keyHintLetter="6" + latin:popupCharacters="@string/alternates_for_z" /> + <Key + latin:keyLabel="u" + latin:keyHintLetter="7" + latin:popupCharacters="@string/alternates_for_u" /> + <Key + latin:keyLabel="i" + latin:keyHintLetter="8" + latin:popupCharacters="@string/alternates_for_i" /> + <Key + latin:keyLabel="o" + latin:keyHintLetter="9" + latin:popupCharacters="@string/alternates_for_o" /> + <Key + latin:keyLabel="p" + latin:keyHintLetter="0" + latin:popupCharacters="@string/alternates_for_p" + latin:keyWidth="fillRight" + latin:keyEdgeFlags="right" /> + </Row> + <include + latin:keyboardLayout="@xml/kbd_qwerty_row2" /> + <Row + latin:keyWidth="10%p" + > + <Key + latin:keyStyle="shiftKeyStyle" + latin:keyWidth="15%p" + latin:visualInsetsRight="1%p" + latin:keyEdgeFlags="left" /> + <Key + latin:keyLabel="y" + latin:popupCharacters="@string/alternates_for_y" /> + <Key + latin:keyLabel="x" /> + <Key + latin:keyLabel="c" + latin:popupCharacters="@string/alternates_for_c" /> + <Key + latin:keyLabel="v" + latin:popupCharacters="@string/alternates_for_v" /> + <Key + latin:keyLabel="b" /> + <Key + latin:keyLabel="n" + latin:popupCharacters="@string/alternates_for_n" /> + <Key + latin:keyLabel="m" /> + <Key + latin:keyStyle="deleteKeyStyle" + latin:keyWidth="fillRight" + latin:visualInsetsLeft="1%p" + latin:keyEdgeFlags="right" /> + </Row> + <include + latin:keyboardLayout="@xml/kbd_qwerty_row4" /> +</merge> diff --git a/java/res/xml/kbd_rows_russian.xml b/java/res/xml/kbd_rows_russian.xml new file mode 100644 index 000000000..ff9fef409 --- /dev/null +++ b/java/res/xml/kbd_rows_russian.xml @@ -0,0 +1,140 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** +** Copyright 2011, 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" +> + <include + latin:keyboardLayout="@xml/kbd_key_styles" /> + <Row + latin:keyWidth="9.091%p" + latin:rowEdgeFlags="top" + > + <Key + latin:keyLabel="й" + latin:keyHintLetter="1" + latin:popupCharacters="1" + latin:keyWidth="8.75%p" + latin:keyEdgeFlags="left" /> + <Key + latin:keyLabel="ц" + latin:keyHintLetter="2" + latin:popupCharacters="2" /> + <Key + latin:keyLabel="у" + latin:keyHintLetter="3" + latin:popupCharacters="3" /> + <Key + latin:keyLabel="к" + latin:keyHintLetter="4" + latin:popupCharacters="4" /> + <Key + latin:keyLabel="е" + latin:keyHintLetter="5" + latin:popupCharacters="@string/alternates_for_cyrillic_e" /> + <Key + latin:keyLabel="н" + latin:keyHintLetter="6" + latin:popupCharacters="6" /> + <Key + latin:keyLabel="г" + latin:keyHintLetter="7" + latin:popupCharacters="7" /> + <Key + latin:keyLabel="ш" + latin:keyHintLetter="8" + latin:popupCharacters="8" /> + <Key + latin:keyLabel="щ" + latin:keyHintLetter="9" + latin:popupCharacters="9" /> + <Key + latin:keyLabel="з" + latin:keyHintLetter="0" + latin:popupCharacters="0" /> + <Key + latin:keyLabel="х" + latin:keyWidth="fillRight" + latin:keyEdgeFlags="right" /> + </Row> + <Row + latin:keyWidth="9.091%p" + > + <Key + latin:keyLabel="ф" + latin:keyWidth="8.75%p" + latin:keyEdgeFlags="left" /> + <Key + latin:keyLabel="ы" /> + <Key + latin:keyLabel="в" /> + <Key + latin:keyLabel="а" /> + <Key + latin:keyLabel="п" /> + <Key + latin:keyLabel="р" /> + <Key + latin:keyLabel="о" /> + <Key + latin:keyLabel="л" /> + <Key + latin:keyLabel="д" /> + <Key + latin:keyLabel="ж" /> + <Key + latin:keyLabel="э" + latin:keyWidth="fillRight" + latin:keyEdgeFlags="right" /> + </Row> + <Row + latin:keyWidth="8.5%p" + > + <Key + latin:keyStyle="shiftKeyStyle" + latin:keyWidth="11.75%p" + latin:keyEdgeFlags="left" /> + <Key + latin:keyLabel="я" /> + <Key + latin:keyLabel="ч" /> + <Key + latin:keyLabel="с" /> + <Key + latin:keyLabel="м" /> + <Key + latin:keyLabel="и" /> + <Key + latin:keyLabel="т" /> + <Key + latin:keyLabel="ь" + latin:popupCharacters="@string/alternates_for_cyrillic_soft_sign" /> + <Key + latin:keyLabel="б" /> + <Key + latin:keyLabel="ю" /> + <Key + latin:keyStyle="deleteKeyStyle" + latin:keyWidth="fillRight" + latin:keyEdgeFlags="right" /> + </Row> + <include + latin:keyboardLayout="@xml/kbd_qwerty_row4" /> +</merge> diff --git a/java/res/xml/kbd_rows_scandinavian.xml b/java/res/xml/kbd_rows_scandinavian.xml new file mode 100644 index 000000000..2d7dcde7a --- /dev/null +++ b/java/res/xml/kbd_rows_scandinavian.xml @@ -0,0 +1,119 @@ +<?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" +> + <include + latin:keyboardLayout="@xml/kbd_key_styles" /> + <Row + latin:keyWidth="9.09%p" + latin:rowEdgeFlags="top" + > + <Key + latin:keyLabel="q" + latin:keyHintLetter="1" + latin:popupCharacters="@string/alternates_for_q" + latin:keyWidth="8.75%p" + latin:keyEdgeFlags="left" /> + <Key + latin:keyLabel="w" + latin:keyHintLetter="2" + latin:popupCharacters="@string/alternates_for_w" /> + <Key + latin:keyLabel="e" + latin:keyHintLetter="3" + latin:popupCharacters="@string/alternates_for_e" /> + <Key + latin:keyLabel="r" + latin:keyHintLetter="4" + latin:popupCharacters="@string/alternates_for_r" /> + <Key + latin:keyLabel="t" + latin:keyHintLetter="5" + latin:popupCharacters="@string/alternates_for_t" /> + <Key + latin:keyLabel="y" + latin:keyHintLetter="6" + latin:popupCharacters="@string/alternates_for_y" /> + <Key + latin:keyLabel="u" + latin:keyHintLetter="7" + latin:popupCharacters="@string/alternates_for_u" /> + <Key + latin:keyLabel="i" + latin:keyHintLetter="8" + latin:popupCharacters="@string/alternates_for_i" /> + <Key + latin:keyLabel="o" + latin:keyHintLetter="9" + latin:popupCharacters="@string/alternates_for_o" /> + <Key + latin:keyLabel="p" + latin:keyHintLetter="0" + latin:popupCharacters="@string/alternates_for_p" /> + <Key + latin:keyLabel="å" + latin:keyWidth="fillRight" + latin:keyEdgeFlags="right" /> + </Row> + <Row + latin:keyWidth="9.09%p" + > + <Key + latin:keyLabel="a" + latin:popupCharacters="@string/alternates_for_a" + latin:keyWidth="8.75%p" + latin:keyEdgeFlags="left" /> + <Key + latin:keyLabel="s" + latin:popupCharacters="@string/alternates_for_s" /> + <Key + latin:keyLabel="d" + latin:popupCharacters="@string/alternates_for_d" /> + <Key + latin:keyLabel="f" /> + <Key + latin:keyLabel="g" + latin:popupCharacters="@string/alternates_for_g" /> + <Key + latin:keyLabel="h" /> + <Key + latin:keyLabel="j" /> + <Key + latin:keyLabel="k" + latin:popupCharacters="@string/alternates_for_k" /> + <Key + latin:keyLabel="l" + latin:popupCharacters="@string/alternates_for_l" /> + <Key + latin:keyLabel="@string/keylabel_for_scandinavia_row2_10" + latin:popupCharacters="@string/alternates_for_scandinavia_row2_10" /> + <Key + latin:keyLabel="@string/keylabel_for_scandinavia_row2_11" + latin:popupCharacters="@string/alternates_for_scandinavia_row2_11" + latin:keyWidth="fillRight" + latin:keyEdgeFlags="right" /> + </Row> + <include + latin:keyboardLayout="@xml/kbd_qwerty_row3" /> + <include + latin:keyboardLayout="@xml/kbd_qwerty_row4" /> +</merge> diff --git a/java/res/xml/kbd_rows_serbian.xml b/java/res/xml/kbd_rows_serbian.xml new file mode 100644 index 000000000..9f4b6a203 --- /dev/null +++ b/java/res/xml/kbd_rows_serbian.xml @@ -0,0 +1,136 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** +** Copyright 2011, 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" +> + <include + latin:keyboardLayout="@xml/kbd_key_styles" /> + <Row + latin:keyWidth="9.09%p" + latin:rowEdgeFlags="top" + > + <Key + latin:keyLabel="љ" + latin:keyHintLetter="1" + latin:popupCharacters="1" + latin:keyEdgeFlags="left" /> + <Key + latin:keyLabel="њ" + latin:keyHintLetter="2" + latin:popupCharacters="2" /> + <Key + latin:keyLabel="е" + latin:keyHintLetter="3" + latin:popupCharacters="3" /> + <Key + latin:keyLabel="р" + latin:keyHintLetter="4" + latin:popupCharacters="4" /> + <Key + latin:keyLabel="т" + latin:keyHintLetter="5" + latin:popupCharacters="5" /> + <Key + latin:keyLabel="з" + latin:keyHintLetter="6" + latin:popupCharacters="6" /> + <Key + latin:keyLabel="у" + latin:keyHintLetter="7" + latin:popupCharacters="7" /> + <Key + latin:keyLabel="и" + latin:keyHintLetter="8" + latin:popupCharacters="8" /> + <Key + latin:keyLabel="о" + latin:keyHintLetter="9" + latin:popupCharacters="9" /> + <Key + latin:keyLabel="п" + latin:keyHintLetter="0" + latin:popupCharacters="0" /> + <Key + latin:keyLabel="ш" + latin:keyWidth="fillRight" + latin:keyEdgeFlags="right" /> + </Row> + <Row + latin:keyWidth="9.09%p" + > + <Key + latin:keyLabel="а" + latin:keyEdgeFlags="left" /> + <Key + latin:keyLabel="с" /> + <Key + latin:keyLabel="д" /> + <Key + latin:keyLabel="ф" /> + <Key + latin:keyLabel="г" /> + <Key + latin:keyLabel="х" /> + <Key + latin:keyLabel="ј" /> + <Key + latin:keyLabel="к" /> + <Key + latin:keyLabel="л" /> + <Key + latin:keyLabel="ч" /> + <Key + latin:keyLabel="ћ" + latin:keyWidth="fillRight" + latin:keyEdgeFlags="right" /> + </Row> + <Row + latin:keyWidth="8.90%p" + > + <Key + latin:keyStyle="shiftKeyStyle" + latin:keyEdgeFlags="left" /> + <Key + latin:keyLabel="ѕ" /> + <Key + latin:keyLabel="џ" /> + <Key + latin:keyLabel="ц" /> + <Key + latin:keyLabel="в" /> + <Key + latin:keyLabel="б" /> + <Key + latin:keyLabel="н" /> + <Key + latin:keyLabel="м" /> + <Key + latin:keyLabel="ђ" /> + <Key + latin:keyLabel="ж" /> + <Key + latin:keyStyle="deleteKeyStyle" + latin:keyWidth="fillRight" + latin:keyEdgeFlags="right" /> + </Row> + <include + latin:keyboardLayout="@xml/kbd_qwerty_row4" /> +</merge> diff --git a/java/res/xml/kbd_rows_spanish.xml b/java/res/xml/kbd_rows_spanish.xml new file mode 100644 index 000000000..c5ead10da --- /dev/null +++ b/java/res/xml/kbd_rows_spanish.xml @@ -0,0 +1,64 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** +** Copyright 2011, 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" +> + <include + latin:keyboardLayout="@xml/kbd_key_styles" /> + <include + latin:keyboardLayout="@xml/kbd_qwerty_row1" /> + <Row + latin:keyWidth="10%p" + > + <Key + latin:keyLabel="a" + latin:popupCharacters="@string/alternates_for_a" + latin:keyEdgeFlags="left" /> + <Key + latin:keyLabel="s" + latin:popupCharacters="@string/alternates_for_s" /> + <Key + latin:keyLabel="d" + latin:popupCharacters="@string/alternates_for_d" /> + <Key + latin:keyLabel="f" /> + <Key + latin:keyLabel="g" + latin:popupCharacters="@string/alternates_for_g" /> + <Key + latin:keyLabel="h" /> + <Key + latin:keyLabel="j" /> + <Key + latin:keyLabel="k" + latin:popupCharacters="@string/alternates_for_k" /> + <Key + latin:keyLabel="l" + latin:popupCharacters="@string/alternates_for_l" /> + <Key + latin:keyLabel="ñ" + latin:keyEdgeFlags="right" /> + </Row> + <include + latin:keyboardLayout="@xml/kbd_qwerty_row3" /> + <include + latin:keyboardLayout="@xml/kbd_qwerty_row4" /> +</merge> diff --git a/java/res/xml/kbd_symbols.xml b/java/res/xml/kbd_symbols.xml index bcb6e8ae8..8e9124f74 100644 --- a/java/res/xml/kbd_symbols.xml +++ b/java/res/xml/kbd_symbols.xml @@ -19,196 +19,110 @@ --> <Keyboard - xmlns:android="http://schemas.android.com/apk/res/android" - android:keyWidth="10%p" - android:horizontalGap="0px" - android:verticalGap="@dimen/key_bottom_gap" - android:keyHeight="@dimen/key_height" + xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" + latin:keyWidth="10%p" > + <include + latin:keyboardLayout="@xml/kbd_key_styles" /> + <include + latin:keyboardLayout="@xml/kbd_currency_key_styles" /> <Row - android:rowEdgeFlags="top" + latin:rowEdgeFlags="top" > <Key - android:keyLabel="1" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="¹½⅓¼⅛" - android:keyEdgeFlags="left" /> + latin:keyLabel="1" + latin:popupCharacters="¹,½,⅓,¼,⅛" + latin:keyEdgeFlags="left" /> <Key - android:keyLabel="2" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="²⅔" /> + latin:keyLabel="2" + latin:popupCharacters="²,⅔" /> <Key - android:keyLabel="3" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="³¾⅜" /> + latin:keyLabel="3" + latin:popupCharacters="³,¾,⅜" /> <Key - android:keyLabel="4" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="⁴" /> + latin:keyLabel="4" + latin:popupCharacters="⁴" /> <Key - android:keyLabel="5" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="⅝" /> + latin:keyLabel="5" + latin:popupCharacters="⅝" /> <Key - android:keyLabel="6" /> + latin:keyLabel="6" /> <Key - android:keyLabel="7" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="⅞" /> + latin:keyLabel="7" + latin:popupCharacters="⅞" /> <Key - android:keyLabel="8" /> + latin:keyLabel="8" /> <Key - android:keyLabel="9" /> + latin:keyLabel="9" /> <Key - android:keyLabel="0" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="ⁿ∅" - android:keyEdgeFlags="right" /> + latin:keyLabel="0" + latin:popupCharacters="ⁿ,∅" + latin:keyWidth="fillRight" + latin:keyEdgeFlags="right" /> </Row> <Row> <Key - android:keyLabel="\@" - android:keyEdgeFlags="left" /> + latin:keyLabel="\@" + latin:keyEdgeFlags="left" /> <Key - android:keyLabel="\#" /> + latin:keyLabel="\#" /> <Key - android:keyLabel="$" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="¢£€¥₣₤₱" /> + latin:keyStyle="currencyKeyStyle" /> <Key - android:keyLabel="%" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="‰" /> + latin:keyLabel="%" + latin:popupCharacters="‰" /> <Key - android:keyLabel="&" /> + latin:keyLabel="&" /> <Key - android:keyLabel="*" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="†‡★" /> + latin:keyLabel="*" + latin:popupCharacters="†,‡,★" /> <Key - android:keyLabel="-" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="_–—" /> + latin:keyLabel="-" + latin:popupCharacters="_,–,—" /> <Key - android:keyLabel="+" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="±" /> + latin:keyLabel="+" + latin:popupCharacters="±" /> <Key - android:keyLabel="(" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="[{<" /> + latin:keyLabel="(" + latin:popupCharacters="[,{,<" /> <Key - android:keyLabel=")" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="]}>" - android:keyEdgeFlags="right" /> + latin:keyLabel=")" + latin:popupCharacters="],},>" + latin:keyWidth="fillRight" + latin:keyEdgeFlags="right" /> </Row> <Row> <Key - android:codes="@integer/key_shift" - android:keyLabel="@string/label_alt_key" - android:keyWidth="15%p" - android:isModifier="true" - android:isSticky="true" - android:keyEdgeFlags="left" /> + latin:keyStyle="altKeyStyle" + latin:keyWidth="15%p" + latin:visualInsetsRight="1%p" + latin:keyEdgeFlags="left" /> <Key - android:keyLabel="!" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="¡" /> + latin:keyLabel="!" + latin:popupCharacters="¡" /> + <!-- Note: DroidSans doesn't have double-high-reversed-quotation '\u201f' glyph. --> + <!-- latin:popupCharacters="“,”,„,‟,«,»" --> <Key - android:keyLabel=""" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="“”«»˝" /> + latin:keyLabel=""" + latin:popupCharacters="“,”,«,»" + latin:maxPopupKeyboardColumn="6" /> <Key - android:keyLabel="\'" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="‘’" /> + latin:keyLabel="\'" + latin:popupCharacters="‘,’,‚,‛" /> <Key - android:keyLabel=":" /> + latin:keyLabel=":" /> <Key - android:keyLabel=";" /> + latin:keyLabel=";" /> <Key - android:keyLabel="/" /> + latin:keyLabel="/" /> <Key - android:keyLabel="\?" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="¿" /> + latin:keyLabel="\?" + latin:popupCharacters="¿" /> <Key - android:codes="@integer/key_delete" - android:keyIcon="@drawable/sym_keyboard_delete" - android:iconPreview="@drawable/sym_keyboard_feedback_delete" - android:keyWidth="15%p" - android:isModifier="true" - android:isRepeatable="true" - android:keyEdgeFlags="right" /> - </Row> - <Row - android:keyboardMode="@+id/mode_symbols" - android:rowEdgeFlags="bottom" - > - <Key - android:codes="@integer/key_symbol" - android:keyLabel="@string/label_alpha_key" - android:keyWidth="20%p" - android:isModifier="true" - android:keyEdgeFlags="left" /> - <Key - android:codes="@integer/key_f1" - android:isModifier="true" /> - <Key - android:codes="@integer/key_space" - android:keyIcon="@drawable/sym_keyboard_space" - android:iconPreview="@drawable/sym_keyboard_feedback_space" - android:keyWidth="40%p" - android:isModifier="true" /> - <Key - android:keyLabel="." - android:keyIcon="@drawable/hint_popup" - android:popupKeyboard="@xml/popup_punctuation" - android:isModifier="true" /> - <Key - android:codes="@integer/key_return" - android:keyIcon="@drawable/sym_keyboard_return" - android:iconPreview="@drawable/sym_keyboard_feedback_return" - android:keyWidth="20%p" - android:isModifier="true" - android:keyEdgeFlags="right" /> - </Row> - <Row - android:keyboardMode="@+id/mode_symbols_with_settings_key" - android:rowEdgeFlags="bottom" - > - <Key - android:codes="@integer/key_symbol" - android:keyLabel="@string/label_alpha_key" - android:keyWidth="15%p" - android:isModifier="true" - android:keyEdgeFlags="left" /> - <Key - android:codes="@integer/key_settings" - android:keyIcon="@drawable/sym_keyboard_settings" - android:iconPreview="@drawable/sym_keyboard_feedback_settings" - android:isModifier="true" /> - <Key - android:codes="@integer/key_f1" - android:isModifier="true" /> - <Key - android:codes="@integer/key_space" - android:keyIcon="@drawable/sym_keyboard_space" - android:iconPreview="@drawable/sym_keyboard_feedback_space" - android:keyWidth="30%p" - android:isModifier="true" /> - <Key - android:keyLabel="." - android:keyIcon="@drawable/hint_popup" - android:popupKeyboard="@xml/popup_punctuation" - android:isModifier="true" /> - <Key - android:codes="@integer/key_return" - android:keyIcon="@drawable/sym_keyboard_return" - android:iconPreview="@drawable/sym_keyboard_feedback_return" - android:keyWidth="25%p" - android:isModifier="true" - android:keyEdgeFlags="right" /> + latin:keyStyle="deleteKeyStyle" + latin:keyWidth="fillRight" + latin:visualInsetsLeft="1%p" + latin:keyEdgeFlags="right" /> </Row> + <include latin:keyboardLayout="@xml/kbd_symbols_row4" /> </Keyboard> diff --git a/java/res/xml/kbd_symbols_black.xml b/java/res/xml/kbd_symbols_black.xml deleted file mode 100644 index add6c01c5..000000000 --- a/java/res/xml/kbd_symbols_black.xml +++ /dev/null @@ -1,202 +0,0 @@ -<?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:android="http://schemas.android.com/apk/res/android" - android:keyWidth="10%p" - android:horizontalGap="0px" - android:verticalGap="@dimen/key_bottom_gap" - android:keyHeight="@dimen/key_height" -> - <Row - android:rowEdgeFlags="top" - > - <Key - android:keyLabel="1" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="¹½⅓¼⅛" - android:keyEdgeFlags="left" /> - <Key - android:keyLabel="2" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="²⅔" /> - <Key - android:keyLabel="3" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="³¾⅜" /> - <Key - android:keyLabel="4" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="⁴" /> - <Key - android:keyLabel="5" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="⅝" /> - <Key - android:keyLabel="6" /> - <Key - android:keyLabel="7" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="⅞" /> - <Key - android:keyLabel="8" /> - <Key - android:keyLabel="9" /> - <Key - android:keyLabel="0" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="ⁿ∅" - android:keyEdgeFlags="right" /> - </Row> - <Row> - <Key - android:keyLabel="\@" - android:keyEdgeFlags="left" /> - <Key - android:keyLabel="\#" /> - <Key - android:keyLabel="$" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="¢£€¥₣₤₱" /> - <Key - android:keyLabel="%" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="‰" /> - <Key - android:keyLabel="&" /> - <Key - android:keyLabel="*" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="†‡★" /> - <Key - android:keyLabel="-" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="_–—" /> - <Key - android:keyLabel="+" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="±" /> - <Key - android:keyLabel="(" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="[{<" /> - <Key - android:keyLabel=")" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="]}>" - android:keyEdgeFlags="right" /> - </Row> - <Row> - <Key - android:codes="@integer/key_shift" - android:keyLabel="@string/label_alt_key" - android:keyWidth="15%p" - android:isModifier="true" - android:isSticky="true" - android:keyEdgeFlags="left" /> - <Key - android:keyLabel="!" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="¡" /> - <Key - android:keyLabel=""" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="“”«»˝" /> - <Key - android:keyLabel="\'" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="‘’" /> - <Key - android:keyLabel=":" /> - <Key - android:keyLabel=";" /> - <Key - android:keyLabel="/" /> - <Key - android:keyLabel="\?" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="¿" /> - <Key - android:codes="@integer/key_delete" - android:keyIcon="@drawable/sym_bkeyboard_delete" - android:iconPreview="@drawable/sym_keyboard_feedback_delete" - android:keyWidth="15%p" - android:isRepeatable="true" - android:keyEdgeFlags="right" /> - </Row> - <Row - android:keyboardMode="@+id/mode_symbols" - android:rowEdgeFlags="bottom" - > - <Key - android:codes="@integer/key_symbol" - android:keyLabel="@string/label_alpha_key" - android:keyWidth="20%p" - android:keyEdgeFlags="left" /> - <Key - android:codes="@integer/key_f1" /> - <Key - android:codes="@integer/key_space" - android:keyIcon="@drawable/sym_bkeyboard_space" - android:iconPreview="@drawable/sym_keyboard_feedback_space" - android:keyWidth="40%p" /> - <Key - android:keyLabel="." - android:keyIcon="@drawable/hint_popup" - android:popupKeyboard="@xml/popup_punctuation" /> - <Key - android:codes="@integer/key_return" - android:keyIcon="@drawable/sym_bkeyboard_return" - android:iconPreview="@drawable/sym_keyboard_feedback_return" - android:keyWidth="20%p" - android:keyEdgeFlags="right" /> - </Row> - <Row - android:keyboardMode="@+id/mode_symbols_with_settings_key" - android:rowEdgeFlags="bottom" - > - <Key - android:codes="@integer/key_symbol" - android:keyLabel="@string/label_alpha_key" - android:keyWidth="15%p" - android:keyEdgeFlags="left" /> - <Key - android:codes="@integer/key_settings" - android:keyIcon="@drawable/sym_bkeyboard_settings" - android:iconPreview="@drawable/sym_keyboard_feedback_settings" /> - <Key - android:codes="@integer/key_f1" /> - <Key - android:codes="@integer/key_space" - android:keyIcon="@drawable/sym_bkeyboard_space" - android:iconPreview="@drawable/sym_keyboard_feedback_space" - android:keyWidth="30%p" /> - <Key - android:keyLabel="." - android:keyIcon="@drawable/hint_popup" - android:popupKeyboard="@xml/popup_punctuation" /> - <Key - android:codes="@integer/key_return" - android:keyIcon="@drawable/sym_bkeyboard_return" - android:iconPreview="@drawable/sym_keyboard_feedback_return" - android:keyWidth="25%p" - android:keyEdgeFlags="right" /> - </Row> -</Keyboard> diff --git a/java/res/xml/kbd_symbols_f1.xml b/java/res/xml/kbd_symbols_f1.xml new file mode 100644 index 000000000..da5b5fc8d --- /dev/null +++ b/java/res/xml/kbd_symbols_f1.xml @@ -0,0 +1,63 @@ +<?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="true" + > + <switch> + <case + latin:hasVoiceKey="true" + > + <Key + latin:keyStyle="shortcutKeyStyle" + latin:keyWidth="9.2%p" /> + </case> + <!-- latin:hasVoiceKey="false" --> + <default> + <Key + latin:keyLabel="," + latin:keyWidth="9.2%p" + latin:keyStyle="settingsPopupStyle" /> + </default> + </switch> + </case> + <!-- hasSettingsKey="false" --> + <default> + <switch> + <case + latin:hasVoiceKey="true" + > + <Key + latin:keyStyle="shortcutKeyStyle" /> + </case> + <!-- latin:hasVoiceKey="false" --> + <default> + <Key + latin:keyLabel="," + latin:keyStyle="settingsPopupStyle" /> + </default> + </switch> + </default> + </switch> +</merge> diff --git a/java/res/xml/kbd_symbols_row4.xml b/java/res/xml/kbd_symbols_row4.xml new file mode 100644 index 000000000..9323d4fd1 --- /dev/null +++ b/java/res/xml/kbd_symbols_row4.xml @@ -0,0 +1,88 @@ +<?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" +> + <Row + latin:keyWidth="10%p" + latin:rowEdgeFlags="bottom" + > + <switch> + <case + latin:hasSettingsKey="true" + > + <Key + latin:keyStyle="toAlphaKeyStyle" + latin:keyWidth="13.75%p" + latin:keyEdgeFlags="left" /> + <Key + latin:keyStyle="settingsKeyStyle" + latin:keyWidth="9.2%p" /> + <include + latin:keyboardLayout="@xml/kbd_qwerty_f1" /> + <Key + latin:keyStyle="spaceKeyStyle" + latin:keyWidth="35.83%p" /> + <Key + latin:keyLabel="." + latin:keyLabelOption="popupHint" + latin:popupCharacters="@string/alternates_for_punctuation" + latin:keyWidth="9.2%p" + latin:maxPopupKeyboardColumn="7" + latin:keyStyle="functionalKeyStyle" /> + </case> + <!-- latin:hasSettingsKey="false" --> + <default> + <Key + latin:keyStyle="toAlphaKeyStyle" + latin:keyWidth="15%p" + latin:keyEdgeFlags="left" /> + <include + latin:keyboardLayout="@xml/kbd_symbols_f1" /> + <Key + latin:keyStyle="spaceKeyStyle" + latin:keyWidth="50%p" /> + <Key + latin:keyLabel="." + latin:keyLabelOption="popupHint" + latin:popupCharacters="@string/alternates_for_punctuation" + latin:maxPopupKeyboardColumn="7" + latin:keyStyle="functionalKeyStyle" /> + </default> + </switch> + <switch> + <case + latin:mode="im" + > + <Key + latin:keyStyle="smileyKeyStyle" + latin:keyWidth="fillRight" + latin:keyEdgeFlags="right" /> + </case> + <default> + <Key + latin:keyStyle="returnKeyStyle" + latin:keyWidth="fillRight" + latin:keyEdgeFlags="right" /> + </default> + </switch> + </Row> +</merge> diff --git a/java/res/xml/kbd_symbols_shift.xml b/java/res/xml/kbd_symbols_shift.xml index 9bee22069..f22d45aff 100644 --- a/java/res/xml/kbd_symbols_shift.xml +++ b/java/res/xml/kbd_symbols_shift.xml @@ -19,171 +19,109 @@ --> <Keyboard - xmlns:android="http://schemas.android.com/apk/res/android" - android:keyWidth="10%p" - android:horizontalGap="0px" - android:verticalGap="@dimen/key_bottom_gap" - android:keyHeight="@dimen/key_height" + xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" + latin:keyWidth="10%p" > + <include + latin:keyboardLayout="@xml/kbd_key_styles" /> <Row - android:rowEdgeFlags="top" + latin:rowEdgeFlags="top" > <Key - android:keyLabel="~" - android:keyEdgeFlags="left" /> + latin:keyLabel="~" + latin:keyEdgeFlags="left" /> <Key - android:keyLabel="`" /> + latin:keyLabel="`" /> <Key - android:keyLabel="|" /> + latin:keyLabel="|" /> <Key - android:keyLabel="•" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="♪♥♠♦♣" /> + latin:keyStyle="nonPasswordSymbolKeyStyle" + latin:keyLabel="•" + latin:popupCharacters="♪,♥,♠,♦,♣" /> <Key - android:keyLabel="√" /> + latin:keyStyle="nonPasswordSymbolKeyStyle" + latin:keyLabel="√" /> <Key - android:keyLabel="π" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="Π" /> + latin:keyStyle="nonPasswordSymbolKeyStyle" + latin:keyLabel="π" + latin:popupCharacters="Π" /> <Key - android:keyLabel="÷" /> + latin:keyStyle="nonPasswordSymbolKeyStyle" + latin:keyLabel="÷" /> <Key - android:keyLabel="×" /> + latin:keyStyle="nonPasswordSymbolKeyStyle" + latin:keyLabel="×" /> <Key - android:keyLabel="{" /> + latin:keyLabel="{" /> <Key - android:keyLabel="}" - android:keyEdgeFlags="right" /> + latin:keyLabel="}" + latin:keyWidth="fillRight" + latin:keyEdgeFlags="right" /> </Row> <Row> <Key - android:codes="@integer/key_tab" - android:keyLabel="\u21E5" - android:keyEdgeFlags="left" /> + latin:keyStyle="nonSpecialBackgroundTabKeyStyle" + latin:keyEdgeFlags="left" /> <Key - android:keyLabel="£" /> + latin:keyStyle="nonPasswordSymbolKeyStyle" + latin:keyLabel="£" /> <Key - android:keyLabel="¢" /> + latin:keyStyle="nonPasswordSymbolKeyStyle" + latin:keyLabel="¢" /> <Key - android:keyLabel="€" /> + latin:keyStyle="nonPasswordSymbolKeyStyle" + latin:keyLabel="€" /> <Key - android:keyLabel="°" /> + latin:keyStyle="nonPasswordSymbolKeyStyle" + latin:keyLabel="°" + latin:popupCharacters="′,″" /> <Key - android:keyLabel="^" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="↑↓←→" /> + latin:keyLabel="^" + latin:popupCharacters="↑,↓,←,→" /> <Key - android:keyLabel="_" /> + latin:keyLabel="_" /> <Key - android:keyLabel="=" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="≠≈∞" /> + latin:keyLabel="=" + latin:popupCharacters="≠,≈,∞" /> <Key - android:keyLabel="[" /> + latin:keyLabel="[" /> <Key - android:keyLabel="]" - android:keyEdgeFlags="right" /> + latin:keyLabel="]" + latin:keyWidth="fillRight" + latin:keyEdgeFlags="right" /> </Row> <Row> <Key - android:codes="@integer/key_shift" - android:keyLabel="@string/label_alt_key" - android:keyWidth="15%p" - android:isModifier="true" - android:isSticky="true" - android:keyEdgeFlags="left" /> + latin:keyStyle="shiftKeyStyle" + latin:keyWidth="15%p" + latin:visualInsetsRight="1%p" + latin:keyEdgeFlags="left" /> <Key - android:keyLabel="™" /> + latin:keyStyle="nonPasswordSymbolKeyStyle" + latin:keyLabel="™" /> <Key - android:keyLabel="®" /> + latin:keyStyle="nonPasswordSymbolKeyStyle" + latin:keyLabel="®" /> <Key - android:keyLabel="©" /> + latin:keyStyle="nonPasswordSymbolKeyStyle" + latin:keyLabel="©" /> <Key - android:keyLabel="¶" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="§" /> + latin:keyStyle="nonPasswordSymbolKeyStyle" + latin:keyLabel="¶" + latin:popupCharacters="§" /> <Key - android:keyLabel="\\" /> + latin:keyLabel="\\" /> <Key - android:keyLabel="<" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="≤«‹" /> + latin:keyLabel="<" + latin:popupCharacters="≤,«,‹" /> <Key - android:keyLabel=">" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="≥»›" /> + latin:keyLabel=">" + latin:popupCharacters="≥,»,›" /> <Key - android:codes="@integer/key_delete" - android:keyIcon="@drawable/sym_keyboard_delete" - android:iconPreview="@drawable/sym_keyboard_feedback_delete" - android:keyWidth="15%p" - android:isModifier="true" - android:isRepeatable="true" - android:keyEdgeFlags="right" /> - </Row> - <Row - android:keyboardMode="@+id/mode_symbols" - android:rowEdgeFlags="bottom" - > - <Key - android:codes="@integer/key_symbol" - android:keyLabel="@string/label_alpha_key" - android:keyWidth="20%p" - android:isModifier="true" - android:keyEdgeFlags="left" /> - <Key - android:keyLabel="„" - android:isModifier="true" /> - <Key - android:codes="@integer/key_space" - android:keyIcon="@drawable/sym_keyboard_space" - android:iconPreview="@drawable/sym_keyboard_feedback_space" - android:keyWidth="40%p" - android:isModifier="true" /> - <Key - android:keyLabel="…" - android:isModifier="true" /> - <Key - android:codes="@integer/key_return" - android:keyIcon="@drawable/sym_keyboard_return" - android:iconPreview="@drawable/sym_keyboard_feedback_return" - android:keyWidth="20%p" - android:isModifier="true" - android:keyEdgeFlags="right" /> - </Row> - <Row - android:keyboardMode="@+id/mode_symbols_with_settings_key" - android:rowEdgeFlags="bottom" - > - <Key - android:codes="@integer/key_symbol" - android:keyLabel="@string/label_alpha_key" - android:keyWidth="15%p" - android:isModifier="true" - android:keyEdgeFlags="left" /> - <Key - android:codes="@integer/key_settings" - android:keyIcon="@drawable/sym_keyboard_settings" - android:iconPreview="@drawable/sym_keyboard_feedback_settings" - android:isModifier="true" /> - <Key - android:keyLabel="„" - android:isModifier="true" /> - <Key - android:codes="@integer/key_space" - android:keyIcon="@drawable/sym_keyboard_space" - android:iconPreview="@drawable/sym_keyboard_feedback_space" - android:keyWidth="30%p" - android:isModifier="true" /> - <Key - android:keyLabel="…" - android:isModifier="true" /> - <Key - android:codes="@integer/key_return" - android:keyIcon="@drawable/sym_keyboard_return" - android:iconPreview="@drawable/sym_keyboard_feedback_return" - android:keyWidth="25%p" - android:isModifier="true" - android:keyEdgeFlags="right" /> + latin:keyStyle="deleteKeyStyle" + latin:keyWidth="fillRight" + latin:visualInsetsLeft="1%p" + latin:keyEdgeFlags="right" /> </Row> + <include latin:keyboardLayout="@xml/kbd_symbols_shift_row4" /> </Keyboard> diff --git a/java/res/xml/kbd_symbols_shift_black.xml b/java/res/xml/kbd_symbols_shift_black.xml deleted file mode 100644 index 52b67c3de..000000000 --- a/java/res/xml/kbd_symbols_shift_black.xml +++ /dev/null @@ -1,177 +0,0 @@ -<?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:android="http://schemas.android.com/apk/res/android" - android:keyWidth="10%p" - android:horizontalGap="0px" - android:verticalGap="@dimen/key_bottom_gap" - android:keyHeight="@dimen/key_height" -> - <Row - android:rowEdgeFlags="top" - > - <Key - android:keyLabel="~" - android:keyEdgeFlags="left" /> - <Key - android:keyLabel="`" /> - <Key - android:keyLabel="|" /> - <Key - android:keyLabel="•" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="♪♥♠♦♣" /> - <Key - android:keyLabel="√" /> - <Key - android:keyLabel="π" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="Π" /> - <Key - android:keyLabel="÷" /> - <Key - android:keyLabel="×" /> - <Key - android:keyLabel="{" /> - <Key - android:keyLabel="}" - android:keyEdgeFlags="right" /> - </Row> - <Row> - <Key - android:codes="@integer/key_tab" - android:keyLabel="\u21E5" - android:keyEdgeFlags="left" /> - <Key - android:keyLabel="£" /> - <Key - android:keyLabel="¢" /> - <Key - android:keyLabel="€" /> - <Key - android:keyLabel="°" /> - <Key - android:keyLabel="^" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="↑↓←→" /> - <Key - android:keyLabel="_" /> - <Key - android:keyLabel="=" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="≠≈∞" /> - <Key - android:keyLabel="[" /> - <Key - android:keyLabel="]" - android:keyEdgeFlags="right" /> - </Row> - <Row> - <Key - android:codes="@integer/key_shift" - android:keyLabel="@string/label_alt_key" - android:keyWidth="15%p" - android:isModifier="true" - android:isSticky="true" - android:keyEdgeFlags="left" /> - <Key - android:keyLabel="™" /> - <Key - android:keyLabel="®" /> - <Key - android:keyLabel="©" /> - <Key - android:keyLabel="¶" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="§" /> - <Key - android:keyLabel="\\" /> - <Key - android:keyLabel="<" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="≤«‹" /> - <Key - android:keyLabel=">" - android:popupKeyboard="@xml/kbd_popup_template" - android:popupCharacters="≥»›" /> - <Key - android:codes="@integer/key_delete" - android:keyIcon="@drawable/sym_bkeyboard_delete" - android:iconPreview="@drawable/sym_keyboard_feedback_delete" - android:keyWidth="15%p" - android:isRepeatable="true" - android:keyEdgeFlags="right" /> - </Row> - <Row - android:keyboardMode="@+id/mode_symbols" - android:rowEdgeFlags="bottom" - > - <Key - android:codes="@integer/key_symbol" - android:keyLabel="@string/label_alpha_key" - android:keyWidth="20%p" - android:keyEdgeFlags="left" /> - <Key - android:keyLabel="„" /> - <Key - android:codes="@integer/key_space" - android:keyIcon="@drawable/sym_bkeyboard_space" - android:iconPreview="@drawable/sym_keyboard_feedback_space" - android:keyWidth="40%p" /> - <Key - android:keyLabel="…" /> - <Key - android:codes="@integer/key_return" - android:keyIcon="@drawable/sym_bkeyboard_return" - android:iconPreview="@drawable/sym_keyboard_feedback_return" - android:keyWidth="20%p" - android:keyEdgeFlags="right" /> - </Row> - <Row - android:keyboardMode="@+id/mode_symbols_with_settings_key" - android:rowEdgeFlags="bottom" - > - <Key - android:codes="@integer/key_symbol" - android:keyLabel="@string/label_alpha_key" - android:keyWidth="15%p" - android:keyEdgeFlags="left" /> - <Key - android:codes="@integer/key_settings" - android:keyIcon="@drawable/sym_bkeyboard_settings" - android:iconPreview="@drawable/sym_keyboard_feedback_settings" /> - <Key - android:keyLabel="„" /> - <Key - android:codes="@integer/key_space" - android:keyIcon="@drawable/sym_bkeyboard_space" - android:iconPreview="@drawable/sym_keyboard_feedback_space" - android:keyWidth="30%p" /> - <Key - android:keyLabel="…" /> - <Key - android:codes="@integer/key_return" - android:keyIcon="@drawable/sym_bkeyboard_return" - android:iconPreview="@drawable/sym_keyboard_feedback_return" - android:keyWidth="25%p" - android:keyEdgeFlags="right" /> - </Row> -</Keyboard> diff --git a/java/res/xml/kbd_symbols_shift_row4.xml b/java/res/xml/kbd_symbols_shift_row4.xml new file mode 100644 index 000000000..90a96e4bc --- /dev/null +++ b/java/res/xml/kbd_symbols_shift_row4.xml @@ -0,0 +1,87 @@ +<?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" +> + <Row + latin:keyWidth="10%p" + latin:rowEdgeFlags="bottom" + > + <switch> + <case + latin:hasSettingsKey="true" + > + <Key + latin:keyStyle="toAlphaKeyStyle" + latin:keyWidth="13.75%p" + latin:keyEdgeFlags="left" /> + <Key + latin:keyStyle="settingsKeyStyle" + latin:keyWidth="9.2%p" /> + <Key + latin:keyLabel="„" + latin:popupCharacters="“,”,„,‟,«,»,‘,’,‚,‛" + latin:keyWidth="9.2%p" + latin:keyStyle="nonPasswordFunctionalKeyStyle" /> + <Key + latin:keyStyle="spaceKeyStyle" + latin:keyWidth="35.83%p" /> + <Key + latin:keyLabel="…" + latin:keyWidth="9.2%p" + latin:keyStyle="nonPasswordFunctionalKeyStyle" /> + </case> + <!-- latin:hasSettingsKey="false" --> + <default> + <Key + latin:keyStyle="toAlphaKeyStyle" + latin:keyWidth="15%p" + latin:keyEdgeFlags="left" /> + <Key + latin:keyLabel="„" + latin:popupCharacters="“,”,„,‟,«,»,‘,’,‚,‛" + latin:keyStyle="nonPasswordFunctionalKeyStyle" /> + <Key + latin:keyStyle="spaceKeyStyle" + latin:keyWidth="50%p" /> + <Key + latin:keyLabel="…" + latin:keyStyle="nonPasswordFunctionalKeyStyle" /> + </default> + </switch> + <switch> + <case + latin:mode="im" + > + <Key + latin:keyStyle="smileyKeyStyle" + latin:keyWidth="fillRight" + latin:keyEdgeFlags="right" /> + </case> + <default> + <Key + latin:keyStyle="returnKeyStyle" + latin:keyWidth="fillRight" + latin:keyEdgeFlags="right" /> + </default> + </switch> + </Row> +</merge> diff --git a/java/res/xml/method.xml b/java/res/xml/method.xml index e5654e96d..c9c920378 100644 --- a/java/res/xml/method.xml +++ b/java/res/xml/method.xml @@ -20,7 +20,239 @@ <!-- The attributes in this XML file provide configuration information --> <!-- for the Input Method Manager. --> +<!-- Keyboard: en_US, en_GB, ar, cs, da, de, es, es_US, fi, fr, fr_CA, fr_CH, hr, hu, it, iw, nb, nl, pl, pt, ru, sr, sv, tr --> +<!-- Voice: af, cs, da, de, en, es, fr, it, ja, ko, nl, pl, pt, ru, tr, yue, zh, zu --> +<!-- TODO: use <lang>_keyboard icon instead of a common keyboard icon. --> +<!-- TODO: use <lang>_mic icon instead of a common mic icon. --> +<!-- TODO: remove all comment outed voice subtypes --> +<!-- If IME doesn't have an applicable subtype, the first subtype will be used as a default + subtype.--> <input-method xmlns:android="http://schemas.android.com/apk/res/android" - android:settingsActivity="com.android.inputmethod.latin.LatinIMESettings" - android:isDefault="@bool/im_is_default" -/> + android:settingsActivity="com.android.inputmethod.latin.Settings" + android:isDefault="@bool/im_is_default"> + <subtype android:icon="@drawable/ic_subtype_keyboard" + android:label="@string/subtype_mode_en_US_keyboard" + android:imeSubtypeLocale="en_US" + android:imeSubtypeMode="keyboard" + /> +<!-- <subtype android:icon="@drawable/ic_subtype_mic" --> +<!-- android:label="@string/subtype_mode_en_voice" --> +<!-- android:imeSubtypeLocale="en" --> +<!-- android:imeSubtypeMode="voice" --> +<!-- android:imeSubtypeExtraValue="excludeFromLastInputMethod,requireNetworkConnectivity" --> +<!-- /> --> + <subtype android:icon="@drawable/ic_subtype_keyboard" + android:label="@string/subtype_mode_en_GB_keyboard" + android:imeSubtypeLocale="en_GB" + android:imeSubtypeMode="keyboard" + /> + <!-- The file for Arabic layout is an alpha version. It needs to be run through UX. --> + <subtype android:icon="@drawable/ic_subtype_keyboard" + android:label="@string/subtype_mode_ar_keyboard" + android:imeSubtypeLocale="ar" + android:imeSubtypeMode="keyboard" + /> + <subtype android:icon="@drawable/ic_subtype_keyboard" + android:label="@string/subtype_mode_cs_keyboard" + android:imeSubtypeLocale="cs" + android:imeSubtypeMode="keyboard" + /> +<!-- <subtype android:icon="@drawable/ic_subtype_mic" --> +<!-- android:label="@string/subtype_mode_cs_voice" --> +<!-- android:imeSubtypeLocale="cs" --> +<!-- android:imeSubtypeMode="voice" --> +<!-- android:imeSubtypeExtraValue="excludeFromLastInputMethod,requireNetworkConnectivity" --> +<!-- /> --> + <subtype android:icon="@drawable/ic_subtype_keyboard" + android:label="@string/subtype_mode_da_keyboard" + android:imeSubtypeLocale="da" + android:imeSubtypeMode="keyboard" + /> + <subtype android:icon="@drawable/ic_subtype_keyboard" + android:label="@string/subtype_mode_de_keyboard" + android:imeSubtypeLocale="de" + android:imeSubtypeMode="keyboard" + /> + <subtype android:icon="@drawable/ic_subtype_keyboard" + android:label="@string/subtype_mode_de_qwerty_keyboard" + android:imeSubtypeLocale="de_ZZ" + android:imeSubtypeMode="keyboard" + /> +<!-- <subtype android:icon="@drawable/ic_subtype_mic" --> +<!-- android:label="@string/subtype_mode_de_voice" --> +<!-- android:imeSubtypeLocale="de" --> +<!-- android:imeSubtypeMode="voice" --> +<!-- android:imeSubtypeExtraValue="excludeFromLastInputMethod,requireNetworkConnectivity" --> +<!-- /> --> + <subtype android:icon="@drawable/ic_subtype_keyboard" + android:label="@string/subtype_mode_es_keyboard" + android:imeSubtypeLocale="es" + android:imeSubtypeMode="keyboard" + /> +<!-- <subtype android:icon="@drawable/ic_subtype_mic" --> +<!-- android:label="@string/subtype_mode_es_voice" --> +<!-- android:imeSubtypeLocale="es" --> +<!-- android:imeSubtypeMode="voice" --> +<!-- android:imeSubtypeExtraValue="excludeFromLastInputMethod,requireNetworkConnectivity" --> +<!-- /> --> + <subtype android:icon="@drawable/ic_subtype_keyboard" + android:label="@string/subtype_mode_fi_keyboard" + android:imeSubtypeLocale="fi" + android:imeSubtypeMode="keyboard" + /> + <subtype android:icon="@drawable/ic_subtype_keyboard" + android:label="@string/subtype_mode_fr_keyboard" + android:imeSubtypeLocale="fr" + android:imeSubtypeMode="keyboard" + /> +<!-- <subtype android:icon="@drawable/ic_subtype_mic" --> +<!-- android:label="@string/subtype_mode_fr_voice" --> +<!-- android:imeSubtypeLocale="fr" --> +<!-- android:imeSubtypeMode="voice" --> +<!-- android:imeSubtypeExtraValue="excludeFromLastInputMethod,requireNetworkConnectivity" --> +<!-- /> --> + <subtype android:icon="@drawable/ic_subtype_keyboard" + android:label="@string/subtype_mode_fr_CA_keyboard" + android:imeSubtypeLocale="fr_CA" + android:imeSubtypeMode="keyboard" + /> + <subtype android:icon="@drawable/ic_subtype_keyboard" + android:label="@string/subtype_mode_fr_CH_keyboard" + android:imeSubtypeLocale="fr_CH" + android:imeSubtypeMode="keyboard" + /> + <subtype android:icon="@drawable/ic_subtype_keyboard" + android:label="@string/subtype_mode_hr_keyboard" + android:imeSubtypeLocale="hr" + android:imeSubtypeMode="keyboard" + /> + <subtype android:icon="@drawable/ic_subtype_keyboard" + android:label="@string/subtype_mode_hu_keyboard" + android:imeSubtypeLocale="hu" + android:imeSubtypeMode="keyboard" + /> + <subtype android:icon="@drawable/ic_subtype_keyboard" + android:label="@string/subtype_mode_it_keyboard" + android:imeSubtypeLocale="it" + android:imeSubtypeMode="keyboard" + /> + <!-- Java uses the deprecated "iw" code instead of the standard "he" code for Hebrew. --> + <!-- The file for Hebrew layout is an alpha version. It needs to be run through UX. --> + <subtype android:icon="@drawable/ic_subtype_keyboard" + android:label="@string/subtype_mode_iw_keyboard" + android:imeSubtypeLocale="iw" + android:imeSubtypeMode="keyboard" + /> +<!-- <subtype android:icon="@drawable/ic_subtype_mic" --> +<!-- android:label="@string/subtype_mode_it_voice" --> +<!-- android:imeSubtypeLocale="it" --> +<!-- android:imeSubtypeMode="voice" --> +<!-- android:imeSubtypeExtraValue="excludeFromLastInputMethod,requireNetworkConnectivity" --> +<!-- /> --> + <subtype android:icon="@drawable/ic_subtype_keyboard" + android:label="@string/subtype_mode_nb_keyboard" + android:imeSubtypeLocale="nb" + android:imeSubtypeMode="keyboard" + /> + <subtype android:icon="@drawable/ic_subtype_keyboard" + android:label="@string/subtype_mode_nl_keyboard" + android:imeSubtypeLocale="nl" + android:imeSubtypeMode="keyboard" + /> +<!-- <subtype android:icon="@drawable/ic_subtype_mic" --> +<!-- android:label="@string/subtype_mode_nl_voice" --> +<!-- android:imeSubtypeLocale="nl" --> +<!-- android:imeSubtypeMode="voice" --> +<!-- android:imeSubtypeExtraValue="excludeFromLastInputMethod,requireNetworkConnectivity" --> +<!-- /> --> + <subtype android:icon="@drawable/ic_subtype_keyboard" + android:label="@string/subtype_mode_pl_keyboard" + android:imeSubtypeLocale="pl" + android:imeSubtypeMode="keyboard" + /> + <subtype android:icon="@drawable/ic_subtype_keyboard" + android:label="@string/subtype_mode_pt_keyboard" + android:imeSubtypeLocale="pt" + android:imeSubtypeMode="keyboard" + /> + <subtype android:icon="@drawable/ic_subtype_keyboard" + android:label="@string/subtype_mode_ru_keyboard" + android:imeSubtypeLocale="ru" + android:imeSubtypeMode="keyboard" + /> + <subtype android:icon="@drawable/ic_subtype_keyboard" + android:label="@string/subtype_mode_sr_keyboard" + android:imeSubtypeLocale="sr" + android:imeSubtypeMode="keyboard" + /> + <subtype android:icon="@drawable/ic_subtype_keyboard" + android:label="@string/subtype_mode_sv_keyboard" + android:imeSubtypeLocale="sv" + android:imeSubtypeMode="keyboard" + /> + <subtype android:icon="@drawable/ic_subtype_keyboard" + android:label="@string/subtype_mode_tr_keyboard" + android:imeSubtypeLocale="tr" + android:imeSubtypeMode="keyboard" + /> +<!-- <subtype android:icon="@drawable/ic_subtype_mic" --> +<!-- android:label="@string/subtype_mode_af_voice" --> +<!-- android:imeSubtypeLocale="af" --> +<!-- android:imeSubtypeMode="voice" --> +<!-- android:imeSubtypeExtraValue="excludeFromLastInputMethod,requireNetworkConnectivity" --> +<!-- /> --> +<!-- <subtype android:icon="@drawable/ic_subtype_mic" --> +<!-- android:label="@string/subtype_mode_ja_voice" --> +<!-- android:imeSubtypeLocale="ja" --> +<!-- android:imeSubtypeMode="voice" --> +<!-- android:imeSubtypeExtraValue="excludeFromLastInputMethod,requireNetworkConnectivity" --> +<!-- /> --> +<!-- <subtype android:icon="@drawable/ic_subtype_mic" --> +<!-- android:label="@string/subtype_mode_ko_voice" --> +<!-- android:imeSubtypeLocale="ko" --> +<!-- android:imeSubtypeMode="voice" --> +<!-- android:imeSubtypeExtraValue="excludeFromLastInputMethod,requireNetworkConnectivity" --> +<!-- /> --> +<!-- <subtype android:icon="@drawable/ic_subtype_mic" --> +<!-- android:label="@string/subtype_mode_pl_voice" --> +<!-- android:imeSubtypeLocale="pl" --> +<!-- android:imeSubtypeMode="voice" --> +<!-- android:imeSubtypeExtraValue="excludeFromLastInputMethod,requireNetworkConnectivity" --> +<!-- /> --> +<!-- <subtype android:icon="@drawable/ic_subtype_mic" --> +<!-- android:label="@string/subtype_mode_pt_voice" --> +<!-- android:imeSubtypeLocale="pt" --> +<!-- android:imeSubtypeMode="voice" --> +<!-- android:imeSubtypeExtraValue="excludeFromLastInputMethod,requireNetworkConnectivity" --> +<!-- /> --> +<!-- <subtype android:icon="@drawable/ic_subtype_mic" --> +<!-- android:label="@string/subtype_mode_ru_voice" --> +<!-- android:imeSubtypeLocale="ru" --> +<!-- android:imeSubtypeMode="voice" --> +<!-- android:imeSubtypeExtraValue="excludeFromLastInputMethod,requireNetworkConnectivity" --> +<!-- /> --> +<!-- <subtype android:icon="@drawable/ic_subtype_mic" --> +<!-- android:label="@string/subtype_mode_tr_voice" --> +<!-- android:imeSubtypeLocale="tr" --> +<!-- android:imeSubtypeMode="voice" --> +<!-- android:imeSubtypeExtraValue="excludeFromLastInputMethod,requireNetworkConnectivity" --> +<!-- /> --> +<!-- <subtype android:icon="@drawable/ic_subtype_mic" --> +<!-- android:label="@string/subtype_mode_yue_voice" --> +<!-- android:imeSubtypeLocale="yue" --> +<!-- android:imeSubtypeMode="voice" --> +<!-- android:imeSubtypeExtraValue="excludeFromLastInputMethod,requireNetworkConnectivity" --> +<!-- /> --> +<!-- <subtype android:icon="@drawable/ic_subtype_mic" --> +<!-- android:label="@string/subtype_mode_zh_voice" --> +<!-- android:imeSubtypeLocale="zh" --> +<!-- android:imeSubtypeMode="voice" --> +<!-- android:imeSubtypeExtraValue="excludeFromLastInputMethod,requireNetworkConnectivity" --> +<!-- /> --> +<!-- <subtype android:icon="@drawable/ic_subtype_mic" --> +<!-- android:label="@string/subtype_mode_zu_voice" --> +<!-- android:imeSubtypeLocale="zu" --> +<!-- android:imeSubtypeMode="voice" --> +<!-- android:imeSubtypeExtraValue="excludeFromLastInputMethod,requireNetworkConnectivity" --> +<!-- /> --> +</input-method> diff --git a/java/res/xml/popup_at.xml b/java/res/xml/popup_at.xml deleted file mode 100644 index 197eea445..000000000 --- a/java/res/xml/popup_at.xml +++ /dev/null @@ -1,39 +0,0 @@ -<?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:android="http://schemas.android.com/apk/res/android" - android:keyWidth="10%p" - android:horizontalGap="0px" - android:verticalGap="0px" - android:keyHeight="@dimen/popup_key_height" -> - <Row - android:rowEdgeFlags="top|bottom" - > - <Key - android:codes="@integer/key_settings" - android:keyIcon="@drawable/sym_keyboard_settings" - android:keyEdgeFlags="left" /> - <Key - android:keyLabel="\@" - android:keyEdgeFlags="right" /> - </Row> -</Keyboard> diff --git a/java/res/xml/popup_comma.xml b/java/res/xml/popup_comma.xml deleted file mode 100644 index 7666f4b62..000000000 --- a/java/res/xml/popup_comma.xml +++ /dev/null @@ -1,39 +0,0 @@ -<?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:android="http://schemas.android.com/apk/res/android" - android:keyWidth="10%p" - android:horizontalGap="0px" - android:verticalGap="0px" - android:keyHeight="@dimen/popup_key_height" -> - <Row - android:rowEdgeFlags="top|bottom" - > - <Key - android:codes="@integer/key_settings" - android:keyIcon="@drawable/sym_keyboard_settings" - android:keyEdgeFlags="left" /> - <Key - android:keyLabel="," - android:keyEdgeFlags="right" /> - </Row> -</Keyboard> diff --git a/java/res/xml/popup_domains.xml b/java/res/xml/popup_domains.xml deleted file mode 100644 index 4e9789ff7..000000000 --- a/java/res/xml/popup_domains.xml +++ /dev/null @@ -1,46 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -/* -** -** Copyright 2008, 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:android="http://schemas.android.com/apk/res/android" - android:keyWidth="15%p" - android:horizontalGap="0px" - android:verticalGap="0px" - android:keyHeight="@dimen/popup_key_height" -> - <Row - android:rowEdgeFlags="top|bottom" - > - <Key - android:keyLabel="@string/popular_domain_1" - android:keyOutputText="@string/popular_domain_1" - android:keyEdgeFlags="left" /> - <Key - android:keyLabel="@string/popular_domain_2" - android:keyOutputText="@string/popular_domain_2" /> - <Key - android:keyLabel="@string/popular_domain_3" - android:keyOutputText="@string/popular_domain_3" /> - <Key - android:keyLabel="@string/popular_domain_4" - android:keyOutputText="@string/popular_domain_4" - android:keyEdgeFlags="right" /> - </Row> -</Keyboard> diff --git a/java/res/xml/popup_mic.xml b/java/res/xml/popup_mic.xml deleted file mode 100644 index 5bbd7dfa5..000000000 --- a/java/res/xml/popup_mic.xml +++ /dev/null @@ -1,40 +0,0 @@ -<?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:android="http://schemas.android.com/apk/res/android" - android:keyWidth="10%p" - android:horizontalGap="0px" - android:verticalGap="0px" - android:keyHeight="@dimen/popup_key_height" -> - <Row - android:rowEdgeFlags="top|bottom" - > - <Key - android:codes="@integer/key_settings" - android:keyIcon="@drawable/sym_keyboard_settings" - android:keyEdgeFlags="left" /> - <Key - android:codes="@integer/key_voice" - android:keyIcon="@drawable/sym_keyboard_mic" - android:keyEdgeFlags="right" /> - </Row> -</Keyboard> diff --git a/java/res/xml/popup_punctuation.xml b/java/res/xml/popup_punctuation.xml deleted file mode 100644 index c429e38bc..000000000 --- a/java/res/xml/popup_punctuation.xml +++ /dev/null @@ -1,68 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -/* -** -** Copyright 2008, 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:android="http://schemas.android.com/apk/res/android" - android:keyWidth="10%p" - android:horizontalGap="0px" - android:verticalGap="0px" - android:keyHeight="@dimen/popup_key_height" -> - <Row - android:rowEdgeFlags="top" - > - <Key - android:keyLabel=":" - android:keyEdgeFlags="left" /> - <Key - android:keyLabel="/" /> - <Key - android:keyLabel="&" /> - <Key - android:keyLabel="(" /> - <Key - android:keyLabel=")" /> - <Key - android:keyLabel="-" /> - <Key - android:keyLabel="+" - android:keyEdgeFlags="right" /> - </Row> - <Row - android:rowEdgeFlags="bottom" - > - <Key - android:keyLabel=";" - android:keyEdgeFlags="left" /> - <Key - android:keyLabel="\@" /> - <Key - android:keyLabel="\'" /> - <Key - android:keyLabel=""" /> - <Key - android:keyLabel="\?" /> - <Key - android:keyLabel="!" /> - <Key - android:keyLabel="," - android:keyEdgeFlags="right" /> - </Row> -</Keyboard> diff --git a/java/res/xml/popup_slash.xml b/java/res/xml/popup_slash.xml deleted file mode 100644 index a38fde0e4..000000000 --- a/java/res/xml/popup_slash.xml +++ /dev/null @@ -1,39 +0,0 @@ -<?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:android="http://schemas.android.com/apk/res/android" - android:keyWidth="10%p" - android:horizontalGap="0px" - android:verticalGap="0px" - android:keyHeight="@dimen/popup_key_height" -> - <Row - android:rowEdgeFlags="top|bottom" - > - <Key - android:codes="@integer/key_settings" - android:keyIcon="@drawable/sym_keyboard_settings" - android:keyEdgeFlags="left" /> - <Key - android:keyLabel="/" - android:keyEdgeFlags="right" /> - </Row> -</Keyboard> diff --git a/java/res/xml/popup_smileys.xml b/java/res/xml/popup_smileys.xml deleted file mode 100644 index 1a14e1df1..000000000 --- a/java/res/xml/popup_smileys.xml +++ /dev/null @@ -1,89 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -/* -** -** Copyright 2008, 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:android="http://schemas.android.com/apk/res/android" - android:keyWidth="15%p" - android:horizontalGap="0px" - android:verticalGap="0px" - android:keyHeight="@dimen/popup_key_height" -> - <Row - android:rowEdgeFlags="top" - > - <Key - android:keyLabel=":-)" - android:keyOutputText=":-) " - android:keyEdgeFlags="left" /> - <Key - android:keyLabel=":-(" - android:keyOutputText=":-( " /> - <Key - android:keyLabel=";-)" - android:keyOutputText=";-) " /> - <Key - android:keyLabel=":-P" - android:keyOutputText=":-P " /> - <Key - android:keyLabel="=-O" - android:keyOutputText="=-O " - android:keyEdgeFlags="right" /> - </Row> - <Row> - <Key - android:keyLabel=":-*" - android:keyOutputText=":-* " - android:keyEdgeFlags="left" /> - <Key - android:keyLabel=":O" - android:keyOutputText=":O " /> - <Key - android:keyLabel="B-)" - android:keyOutputText="B-) " /> - <Key - android:keyLabel=":-$" - android:keyOutputText=":-$ " /> - <Key - android:keyLabel=":-!" - android:keyOutputText=":-! " - android:keyEdgeFlags="right" /> - </Row> - <Row - android:rowEdgeFlags="bottom" - > - <Key - android:keyLabel=":-[" - android:keyOutputText=":-[ " - android:keyEdgeFlags="left" /> - <Key - android:keyLabel="O:-)" - android:keyOutputText="O:-) " /> - <Key - android:keyLabel=":-\\" - android:keyOutputText=":-\\ " /> - <Key - android:keyLabel=":'(" - android:keyOutputText=":'( " /> - <Key - android:keyLabel=":-D" - android:keyOutputText=":-D " - android:keyEdgeFlags="right" /> - </Row> -</Keyboard> diff --git a/java/res/xml/prefs.xml b/java/res/xml/prefs.xml index 9348e954a..f68ee0168 100644 --- a/java/res/xml/prefs.xml +++ b/java/res/xml/prefs.xml @@ -4,9 +4,9 @@ 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. @@ -14,98 +14,151 @@ limitations under the License. --> -<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" - android:title="@string/english_ime_settings" - android:key="english_ime_settings"> - - <CheckBoxPreference +<PreferenceScreen + xmlns:android="http://schemas.android.com/apk/res/android" + android:title="@string/english_ime_settings" + android:key="english_ime_settings"> + <PreferenceCategory + android:title="@string/general_category" + android:key="general_settings"> + <CheckBoxPreference + android:key="auto_cap" + android:title="@string/auto_cap" + android:persistent="true" + android:defaultValue="true" /> + <CheckBoxPreference android:key="vibrate_on" android:title="@string/vibrate_on_keypress" - android:persistent="true" - /> - - <CheckBoxPreference + android:persistent="true" /> + <CheckBoxPreference android:key="sound_on" android:title="@string/sound_on_keypress" - android:persistent="true" - /> - - <CheckBoxPreference + android:defaultValue="@bool/config_default_sound_enabled" + android:persistent="true" /> + <CheckBoxPreference android:key="popup_on" android:title="@string/popup_on_keypress" android:persistent="true" - android:defaultValue="@bool/default_popup_preview" - /> - - <CheckBoxPreference + android:defaultValue="@bool/config_default_popup_preview" /> + <CheckBoxPreference android:key="recorrection_enabled" android:title="@string/prefs_enable_recorrection" android:summary="@string/prefs_enable_recorrection_summary" android:persistent="true" - android:defaultValue="@bool/default_recorrection_enabled" - /> - - <CheckBoxPreference - android:key="auto_cap" - android:title="@string/auto_cap" - android:persistent="true" - android:defaultValue="true" - /> - - <ListPreference + android:defaultValue="@bool/config_default_recorrection_enabled" /> + <ListPreference android:key="settings_key" android:title="@string/prefs_settings_key" android:persistent="true" android:entryValues="@array/settings_key_modes_values" android:entries="@array/settings_key_modes" - android:defaultValue="@string/settings_key_mode_auto" - /> - - <ListPreference + android:defaultValue="@string/settings_key_mode_auto" /> + <ListPreference android:key="voice_mode" android:title="@string/voice_input" android:persistent="true" android:entryValues="@array/voice_input_modes_values" android:entries="@array/voice_input_modes" - android:defaultValue="@string/voice_mode_main" - /> - - - <PreferenceScreen + android:defaultValue="@string/voice_mode_main" /> + <PreferenceScreen + android:key="subtype_settings" android:title="@string/language_selection_title" - android:summary="@string/language_selection_summary"> - <intent - android:action="com.android.inputmethod.latin.INPUT_LANGUAGE_SELECTION"/> - </PreferenceScreen> - + android:summary="@string/language_selection_summary" /> + </PreferenceCategory> <PreferenceCategory - android:title="@string/prediction_category" - android:key="prediction_settings"> - + android:title="@string/correction_category" + android:key="correction_settings"> + <PreferenceScreen + android:key="configure_dictionaries_key" + android:title="@string/configure_dictionaries_title"> + <intent + android:action="android.intent.action.MAIN" + android:targetPackage="com.google.android.inputmethod.latin.dictionarypack" + android:targetClass="com.google.android.inputmethod.latin.dictionarypack.DictionarySettings" /> + </PreferenceScreen> <CheckBoxPreference android:key="quick_fixes" android:title="@string/quick_fixes" android:summary="@string/quick_fixes_summary" android:persistent="true" - android:defaultValue="true" - /> - + android:defaultValue="true" /> + <ListPreference + android:key="auto_correction_threshold" + android:title="@string/auto_correction" + android:summary="@string/auto_correction_summary" + android:persistent="true" + android:entryValues="@array/auto_correction_threshold_mode_indexes" + android:entries="@array/auto_correction_threshold_modes" + android:defaultValue="@string/auto_correction_threshold_mode_index_modest" /> + <ListPreference + android:key="show_suggestions_setting" + android:summary="@string/prefs_show_suggestions_summary" + android:title="@string/prefs_show_suggestions" + android:persistent="true" + android:entryValues="@array/prefs_suggestion_visibility_values" + android:entries="@array/prefs_suggestion_visibilities" + android:defaultValue="@string/prefs_suggestion_visibility_default_value" /> + </PreferenceCategory> + <PreferenceCategory + android:title="@string/ngram_category" + android:key="ngram_settings"> <CheckBoxPreference - android:key="show_suggestions" - android:title="@string/show_suggestions" - android:summary="@string/show_suggestions_summary" + android:key="bigram_suggestion" + android:title="@string/bigram_suggestion" + android:summary="@string/bigram_suggestion_summary" android:persistent="true" - android:defaultValue="true" - /> - + android:defaultValue="true" /> <CheckBoxPreference - android:key="auto_complete" - android:title="@string/auto_complete" - android:summary="@string/auto_complete_summary" - android:persistent="true" - android:defaultValue="@bool/enable_autocorrect" - android:dependency="show_suggestions" - /> - </PreferenceCategory> - + android:key="bigram_prediction" + android:dependency="bigram_suggestion" + android:title="@string/bigram_prediction" + android:summary="@string/bigram_prediction_summary" + android:persistent="true" + android:defaultValue="false" /> + </PreferenceCategory> + <PreferenceCategory + android:title="@string/misc_category" + android:key="misc_settings"> + <CheckBoxPreference + android:key="usability_study_mode" + android:title="@string/prefs_usability_study_mode" + android:persistent="true" + android:defaultValue="false" /> + <CheckBoxPreference + android:key="enable_logging" + android:title="@string/prefs_enable_log" + android:summary="@string/prefs_description_log" + android:persistent="true" + android:defaultValue="true" /> + <ListPreference + android:key="pref_keyboard_layout_20100902" + android:title="@string/keyboard_layout" + android:persistent="true" + android:entryValues="@array/keyboard_layout_modes_values" + android:entries="@array/keyboard_layout_modes" + android:defaultValue="@string/config_default_keyboard_theme_id" /> + </PreferenceCategory> + <PreferenceScreen + android:key="pref_advanced_settings" + android:title="@string/advanced_settings" + android:summary="@string/advanced_settings_summary"> + <!-- Values for popup dismiss delay are added programatically --> + <ListPreference + android:key="pref_key_preview_popup_dismiss_delay" + android:title="@string/key_preview_popup_dismiss_delay" /> + <CheckBoxPreference + android:key="pref_key_use_contacts_dict" + android:title="@string/use_contacts_dict" + android:summary="@string/use_contacts_dict_summary" + android:persistent="true" + android:defaultValue="true" /> + </PreferenceScreen> + <!-- <Preference + android:title="Debug Settings" + android:key="debug_settings"> + <intent + android:action="android.intent.action.MAIN" + android:targetPackage="com.android.inputmethod.latin" + android:targetClass="com.android.inputmethod.latin.DebugSettings" /> + </Preference>--> </PreferenceScreen> diff --git a/java/res/xml/prefs_for_debug.xml b/java/res/xml/prefs_for_debug.xml index 8177d3c6a..477461df4 100644 --- a/java/res/xml/prefs_for_debug.xml +++ b/java/res/xml/prefs_for_debug.xml @@ -32,7 +32,14 @@ android:persistent="true" android:entryValues="@array/keyboard_layout_modes_values" android:entries="@array/keyboard_layout_modes" - android:defaultValue="4" + android:defaultValue="@string/config_default_keyboard_theme_id" + /> + + <CheckBoxPreference + android:key="use_spacebar_language_switch" + android:title="@string/prefs_use_spacebar_language_switch" + android:persistent="true" + android:defaultValue="false" /> <CheckBoxPreference |