aboutsummaryrefslogtreecommitdiffstats
path: root/java/res/xml
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2014-09-26 02:28:21 +0900
committerTadashi G. Takaoka <takaoka@google.com>2014-09-26 16:01:34 +0900
commit8108a3e1cdceb1874804f74ec24d824a7df1b669 (patch)
tree06559a6aebed62cd907328606ad65858c48a28cc /java/res/xml
parent1c70a8e147cebd045ab4963751bbcb7b9bbc1962 (diff)
downloadlatinime-8108a3e1cdceb1874804f74ec24d824a7df1b669.tar.gz
latinime-8108a3e1cdceb1874804f74ec24d824a7df1b669.tar.xz
latinime-8108a3e1cdceb1874804f74ec24d824a7df1b669.zip
Add Serbian Latin keyboard
Bug: 9687668 Change-Id: I0631ab04cf33e3d454c965e98a756c31666537bf
Diffstat (limited to 'java/res/xml')
-rw-r--r--java/res/xml/kbd_serbian_qwertz.xml23
-rw-r--r--java/res/xml/keyboard_layout_set_serbian_qwertz.xml42
-rw-r--r--java/res/xml/method.xml20
-rw-r--r--java/res/xml/rowkeys_serbian_qwertz1.xml25
-rw-r--r--java/res/xml/rowkeys_serbian_qwertz2.xml27
-rw-r--r--java/res/xml/rowkeys_serbian_qwertz3.xml27
-rw-r--r--java/res/xml/rows_serbian_qwertz.xml39
7 files changed, 188 insertions, 15 deletions
diff --git a/java/res/xml/kbd_serbian_qwertz.xml b/java/res/xml/kbd_serbian_qwertz.xml
new file mode 100644
index 000000000..4f763b861
--- /dev/null
+++ b/java/res/xml/kbd_serbian_qwertz.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2014, 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" >
+ <include latin:keyboardLayout="@xml/rows_serbian_qwertz" />
+</Keyboard> \ No newline at end of file
diff --git a/java/res/xml/keyboard_layout_set_serbian_qwertz.xml b/java/res/xml/keyboard_layout_set_serbian_qwertz.xml
new file mode 100644
index 000000000..2c7e28b50
--- /dev/null
+++ b/java/res/xml/keyboard_layout_set_serbian_qwertz.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2014, 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.
+*/
+-->
+
+<KeyboardLayoutSet xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" >
+ <Element
+ latin:allowRedundantMoreKeys="false"
+ latin:elementKeyboard="@xml/kbd_serbian_qwertz"
+ latin:elementName="alphabet"
+ latin:enableProximityCharsCorrection="true" />
+ <Element
+ latin:elementKeyboard="@xml/kbd_symbols"
+ latin:elementName="symbols" />
+ <Element
+ latin:elementKeyboard="@xml/kbd_symbols_shift"
+ latin:elementName="symbolsShifted" />
+ <Element
+ latin:elementKeyboard="@xml/kbd_phone"
+ latin:elementName="phone" />
+ <Element
+ latin:elementKeyboard="@xml/kbd_phone_symbols"
+ latin:elementName="phoneSymbols" />
+ <Element
+ latin:elementKeyboard="@xml/kbd_number"
+ latin:elementName="number" />
+</KeyboardLayoutSet> \ No newline at end of file
diff --git a/java/res/xml/method.xml b/java/res/xml/method.xml
index 74ac79f59..270f90cb8 100644
--- a/java/res/xml/method.xml
+++ b/java/res/xml/method.xml
@@ -89,7 +89,7 @@
sk: Slovak/qwerty
sl: Slovenian/qwerty
sr: Serbian/south_slavic
- (sr-Latn: Serbian/qwerty) # not yet implemented.
+ (sr_ZZ: Serbian (Latin)/serbian_qwertz) # This is a preliminary keyboard layout.
sv: Swedish/nordic
sw: Swahili/qwerty
ta_IN: Tamil (India)/tamil
@@ -661,24 +661,14 @@
android:imeSubtypeExtraValue="SupportTouchPositionCorrection,EmojiCapable"
android:isAsciiCapable="false"
/>
- <!-- TODO: Uncomment once we can handle IETF language tag with script name specified.
<subtype android:icon="@drawable/ic_ime_switcher_dark"
- android:label="@string/subtype_serbian_cyrillic"
- android:subtypeId="0xXXXXXXXX"
- android:imeSubtypeLocale="sr"
- android:imeSubtypeMode="keyboard"
- android:imeSubtypeExtraValue="SupportTouchPositionCorrection,EmojiCapable"
- android:isAsciiCapable="false"
- />
- <subtype android:icon="@drawable/ic_ime_switcher_dark"
- android:label="@string/subtype_serbian_latin"
- android:subtypeId="0xXXXXXXXX"
- android:imeSubtypeLocale="sr-Latn"
+ android:label="@string/subtype_sr_ZZ"
+ android:subtypeId="0xf4a5569c"
+ android:imeSubtypeLocale="sr_ZZ"
android:imeSubtypeMode="keyboard"
- android:imeSubtypeExtraValue="KeyboardLayoutSet=qwerty,AsciiCapable,EmojiCapable"
+ android:imeSubtypeExtraValue="KeyboardLayoutSet=serbian_qwertz,AsciiCapable,EmojiCapable"
android:isAsciiCapable="true"
/>
- -->
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_generic"
android:subtypeId="0x48b4ff43"
diff --git a/java/res/xml/rowkeys_serbian_qwertz1.xml b/java/res/xml/rowkeys_serbian_qwertz1.xml
new file mode 100644
index 000000000..1615701d3
--- /dev/null
+++ b/java/res/xml/rowkeys_serbian_qwertz1.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2014, 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/rowkeys_qwertz1" />
+ <!-- U+0161: "š" LATIN SMALL LETTER S WITH CARON -->
+ <Key latin:keySpec="&#x0161;" />
+</merge> \ No newline at end of file
diff --git a/java/res/xml/rowkeys_serbian_qwertz2.xml b/java/res/xml/rowkeys_serbian_qwertz2.xml
new file mode 100644
index 000000000..83ec92d29
--- /dev/null
+++ b/java/res/xml/rowkeys_serbian_qwertz2.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2014, 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/rowkeys_qwerty2" />
+ <!-- U+010D: "č" LATIN SMALL LETTER C WITH CARON -->
+ <Key latin:keySpec="&#x010D;" />
+ <!-- U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE -->
+ <Key latin:keySpec="&#x0107;" />
+</merge>
diff --git a/java/res/xml/rowkeys_serbian_qwertz3.xml b/java/res/xml/rowkeys_serbian_qwertz3.xml
new file mode 100644
index 000000000..30ba7afa2
--- /dev/null
+++ b/java/res/xml/rowkeys_serbian_qwertz3.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2014, 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/rowkeys_qwertz3" />
+ <!-- U+0111: "đ" LATIN SMALL LETTER D WITH STROKE -->
+ <Key latin:keySpec="&#x0111;" />
+ <!-- U+017E: "ž" LATIN SMALL LETTER Z WITH CARON -->
+ <Key latin:keySpec="&#x017E;" />
+</merge>
diff --git a/java/res/xml/rows_serbian_qwertz.xml b/java/res/xml/rows_serbian_qwertz.xml
new file mode 100644
index 000000000..4be2abf1a
--- /dev/null
+++ b/java/res/xml/rows_serbian_qwertz.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2014, 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/key_styles_common" />
+ <Row latin:keyWidth="9.091%p" >
+ <include latin:keyboardLayout="@xml/rowkeys_serbian_qwertz1" />
+ </Row>
+ <Row latin:keyWidth="9.091%p" >
+ <include latin:keyboardLayout="@xml/rowkeys_serbian_qwertz2" />
+ </Row>
+ <Row latin:keyWidth="8.711%p" >
+ <Key
+ latin:keyStyle="shiftKeyStyle"
+ latin:keyWidth="10.8%p" />
+ <include latin:keyboardLayout="@xml/rowkeys_serbian_qwertz3" />
+ <Key
+ latin:keyStyle="deleteKeyStyle"
+ latin:keyWidth="fillRight" />
+ </Row>
+ <include latin:keyboardLayout="@xml/row_qwerty4" />
+</merge> \ No newline at end of file