aboutsummaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
Diffstat (limited to 'java')
-rw-r--r--java/res/xml-sw600dp/row_qwerty1.xml59
-rw-r--r--java/res/xml-sw600dp/row_qwerty2.xml57
-rw-r--r--java/res/xml-sw600dp/row_qwerty3.xml55
-rw-r--r--java/res/xml-sw600dp/rowkeys_qwerty1.xml51
-rw-r--r--java/res/xml-sw600dp/rowkeys_qwertz1.xml51
-rw-r--r--java/res/xml-sw600dp/rows_qwerty.xml42
-rw-r--r--java/res/xml-sw600dp/rows_qwertz.xml62
-rw-r--r--java/res/xml-sw600dp/rows_scandinavian.xml85
-rw-r--r--java/res/xml-sw600dp/rows_spanish.xml58
-rw-r--r--java/res/xml-sw768dp/row_qwerty1.xml63
-rw-r--r--java/res/xml-sw768dp/row_qwerty2.xml60
-rw-r--r--java/res/xml-sw768dp/row_qwerty3.xml55
-rw-r--r--java/res/xml-sw768dp/rows_qwerty.xml49
-rw-r--r--java/res/xml-sw768dp/rows_qwertz.xml69
-rw-r--r--java/res/xml-sw768dp/rows_scandinavian.xml83
-rw-r--r--java/res/xml-sw768dp/rows_spanish.xml62
-rw-r--r--java/res/xml/row_qwerty1.xml76
-rw-r--r--java/res/xml/row_qwerty2.xml54
-rw-r--r--java/res/xml/row_qwerty3.xml54
-rw-r--r--java/res/xml/rowkeys_qwerty1.xml71
-rw-r--r--java/res/xml/rowkeys_qwerty2.xml48
-rw-r--r--java/res/xml/rowkeys_qwerty3.xml42
-rw-r--r--java/res/xml/rowkeys_qwertz1.xml71
-rw-r--r--java/res/xml/rowkeys_qwertz3.xml42
-rw-r--r--java/res/xml/rowkeys_scandinavian1.xml28
-rw-r--r--java/res/xml/rowkeys_scandinavian2.xml32
-rw-r--r--java/res/xml/rowkeys_spanish2.xml29
-rw-r--r--java/res/xml/rows_qwerty.xml33
-rw-r--r--java/res/xml/rows_qwertz.xml79
-rw-r--r--java/res/xml/rows_scandinavian.xml97
-rw-r--r--java/res/xml/rows_spanish.xml49
-rw-r--r--java/src/com/android/inputmethod/latin/AutoCorrection.java36
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java8
-rw-r--r--java/src/com/android/inputmethod/latin/Suggest.java30
34 files changed, 759 insertions, 1081 deletions
diff --git a/java/res/xml-sw600dp/row_qwerty1.xml b/java/res/xml-sw600dp/row_qwerty1.xml
deleted file mode 100644
index 3d3a1a8ff..000000000
--- a/java/res/xml-sw600dp/row_qwerty1.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-<?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"
->
- <Row
- latin:keyWidth="9.0%p"
- >
- <Key
- latin:keyLabel="q" />
- <Key
- latin:keyLabel="w" />
- <Key
- latin:keyLabel="e"
- latin:moreKeys="@string/more_keys_for_e" />
- <Key
- latin:keyLabel="r"
- latin:moreKeys="@string/more_keys_for_r" />
- <Key
- latin:keyLabel="t"
- latin:moreKeys="@string/more_keys_for_t" />
- <Key
- latin:keyLabel="y"
- latin:moreKeys="@string/more_keys_for_y" />
- <Key
- latin:keyLabel="u"
- latin:moreKeys="@string/more_keys_for_u" />
- <Key
- latin:keyLabel="i"
- latin:moreKeys="@string/more_keys_for_i" />
- <Key
- latin:keyLabel="o"
- latin:moreKeys="@string/more_keys_for_o" />
- <Key
- latin:keyLabel="p" />
- <Key
- latin:keyStyle="deleteKeyStyle"
- latin:keyXPos="-10.0%p"
- latin:keyWidth="fillBoth" />
- </Row>
-</merge>
diff --git a/java/res/xml-sw600dp/row_qwerty2.xml b/java/res/xml-sw600dp/row_qwerty2.xml
deleted file mode 100644
index cabb9cb4a..000000000
--- a/java/res/xml-sw600dp/row_qwerty2.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<?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"
->
- <Row
- latin:keyWidth="9.0%p"
- >
- <Key
- latin:keyLabel="a"
- latin:moreKeys="@string/more_keys_for_a"
- latin:keyXPos="4.5%p" />
- <Key
- latin:keyLabel="s"
- latin:moreKeys="@string/more_keys_for_s" />
- <Key
- latin:keyLabel="d"
- latin:moreKeys="@string/more_keys_for_d" />
- <Key
- latin:keyLabel="f" />
- <Key
- latin:keyLabel="g"
- latin:moreKeys="@string/more_keys_for_g" />
- <Key
- latin:keyLabel="h" />
- <Key
- latin:keyLabel="j" />
- <Key
- latin:keyLabel="k"
- latin:moreKeys="@string/more_keys_for_k" />
- <Key
- latin:keyLabel="l"
- latin:moreKeys="@string/more_keys_for_l" />
- <Key
- latin:keyStyle="enterKeyStyle"
- latin:keyXPos="-14.6%p"
- latin:keyWidth="fillBoth" />
- </Row>
-</merge>
diff --git a/java/res/xml-sw600dp/row_qwerty3.xml b/java/res/xml-sw600dp/row_qwerty3.xml
deleted file mode 100644
index 3d19904a1..000000000
--- a/java/res/xml-sw600dp/row_qwerty3.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-<?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"
->
- <Row
- latin:keyWidth="8.9%p"
- >
- <Key
- latin:keyStyle="shiftKeyStyle"
- latin:keyWidth="10.0%p" />
- <Key
- latin:keyLabel="z"
- latin:moreKeys="@string/more_keys_for_z" />
- <Key
- latin:keyLabel="x" />
- <Key
- latin:keyLabel="c"
- latin:moreKeys="@string/more_keys_for_c" />
- <Key
- latin:keyLabel="v"
- latin:moreKeys="@string/more_keys_for_v" />
- <Key
- latin:keyLabel="b" />
- <Key
- latin:keyLabel="n"
- latin:moreKeys="@string/more_keys_for_n" />
- <Key
- latin:keyLabel="m" />
- <include
- latin:keyboardLayout="@xml/keys_comma_period" />
- <include
- latin:keyboardLayout="@xml/key_smiley"
- latin:keyXPos="-8.9%p"
- latin:keyWidth="fillBoth" />
- </Row>
-</merge>
diff --git a/java/res/xml-sw600dp/rowkeys_qwerty1.xml b/java/res/xml-sw600dp/rowkeys_qwerty1.xml
new file mode 100644
index 000000000..05101ec42
--- /dev/null
+++ b/java/res/xml-sw600dp/rowkeys_qwerty1.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2012, 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
+ latin:keyLabel="q" />
+ <Key
+ latin:keyLabel="w" />
+ <Key
+ latin:keyLabel="e"
+ latin:moreKeys="@string/more_keys_for_e" />
+ <Key
+ latin:keyLabel="r"
+ latin:moreKeys="@string/more_keys_for_r" />
+ <Key
+ latin:keyLabel="t"
+ latin:moreKeys="@string/more_keys_for_t" />
+ <Key
+ latin:keyLabel="y"
+ latin:moreKeys="@string/more_keys_for_y" />
+ <Key
+ latin:keyLabel="u"
+ latin:moreKeys="@string/more_keys_for_u" />
+ <Key
+ latin:keyLabel="i"
+ latin:moreKeys="@string/more_keys_for_i" />
+ <Key
+ latin:keyLabel="o"
+ latin:moreKeys="@string/more_keys_for_o" />
+ <Key
+ latin:keyLabel="p" />
+</merge>
diff --git a/java/res/xml-sw600dp/rowkeys_qwertz1.xml b/java/res/xml-sw600dp/rowkeys_qwertz1.xml
new file mode 100644
index 000000000..d7461e645
--- /dev/null
+++ b/java/res/xml-sw600dp/rowkeys_qwertz1.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2012, 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
+ latin:keyLabel="q" />
+ <Key
+ latin:keyLabel="w" />
+ <Key
+ latin:keyLabel="e"
+ latin:moreKeys="@string/more_keys_for_e" />
+ <Key
+ latin:keyLabel="r"
+ latin:moreKeys="@string/more_keys_for_r" />
+ <Key
+ latin:keyLabel="t"
+ latin:moreKeys="@string/more_keys_for_t" />
+ <Key
+ latin:keyLabel="z"
+ latin:moreKeys="@string/more_keys_for_z" />
+ <Key
+ latin:keyLabel="u"
+ latin:moreKeys="@string/more_keys_for_u" />
+ <Key
+ latin:keyLabel="i"
+ latin:moreKeys="@string/more_keys_for_i" />
+ <Key
+ latin:keyLabel="o"
+ latin:moreKeys="@string/more_keys_for_o" />
+ <Key
+ latin:keyLabel="p" />
+</merge>
diff --git a/java/res/xml-sw600dp/rows_qwerty.xml b/java/res/xml-sw600dp/rows_qwerty.xml
index eb41c5087..8df41acc7 100644
--- a/java/res/xml-sw600dp/rows_qwerty.xml
+++ b/java/res/xml-sw600dp/rows_qwerty.xml
@@ -23,12 +23,42 @@
>
<include
latin:keyboardLayout="@xml/key_styles_common" />
- <include
- latin:keyboardLayout="@xml/row_qwerty1" />
- <include
- latin:keyboardLayout="@xml/row_qwerty2" />
- <include
- latin:keyboardLayout="@xml/row_qwerty3" />
+ <Row
+ latin:keyWidth="9.0%p"
+ >
+ <include
+ latin:keyboardLayout="@xml/rowkeys_qwerty1" />
+ <Key
+ latin:keyStyle="deleteKeyStyle"
+ latin:keyXPos="-10.0%p"
+ latin:keyWidth="fillBoth" />
+ </Row>
+ <Row
+ latin:keyWidth="9.0%p"
+ >
+ <include
+ latin:keyboardLayout="@xml/rowkeys_qwerty2"
+ latin:keyXPos="4.5%p" />
+ <Key
+ latin:keyStyle="enterKeyStyle"
+ latin:keyXPos="-14.6%p"
+ latin:keyWidth="fillBoth" />
+ </Row>
+ <Row
+ latin:keyWidth="8.9%p"
+ >
+ <Key
+ latin:keyStyle="shiftKeyStyle"
+ latin:keyWidth="10.0%p" />
+ <include
+ latin:keyboardLayout="@xml/rowkeys_qwerty3" />
+ <include
+ latin:keyboardLayout="@xml/keys_comma_period" />
+ <include
+ latin:keyboardLayout="@xml/key_smiley"
+ latin:keyXPos="-8.9%p"
+ latin:keyWidth="fillBoth" />
+ </Row>
<include
latin:keyboardLayout="@xml/row_qwerty4" />
</merge>
diff --git a/java/res/xml-sw600dp/rows_qwertz.xml b/java/res/xml-sw600dp/rows_qwertz.xml
index 6912f1c6d..e97bee967 100644
--- a/java/res/xml-sw600dp/rows_qwertz.xml
+++ b/java/res/xml-sw600dp/rows_qwertz.xml
@@ -26,64 +26,32 @@
<Row
latin:keyWidth="9.0%p"
>
- <Key
- latin:keyLabel="q" />
- <Key
- latin:keyLabel="w" />
- <Key
- latin:keyLabel="e"
- latin:moreKeys="@string/more_keys_for_e" />
- <Key
- latin:keyLabel="r"
- latin:moreKeys="@string/more_keys_for_r" />
- <Key
- latin:keyLabel="t"
- latin:moreKeys="@string/more_keys_for_t" />
- <Key
- latin:keyLabel="z"
- latin:moreKeys="@string/more_keys_for_z" />
- <Key
- latin:keyLabel="u"
- latin:moreKeys="@string/more_keys_for_u" />
- <Key
- latin:keyLabel="i"
- latin:moreKeys="@string/more_keys_for_i" />
- <Key
- latin:keyLabel="o"
- latin:moreKeys="@string/more_keys_for_o" />
- <Key
- latin:keyLabel="p" />
+ <include
+ latin:keyboardLayout="@xml/rowkeys_qwertz1" />
<Key
latin:keyStyle="deleteKeyStyle"
latin:keyXPos="-10.0%p"
latin:keyWidth="fillBoth" />
</Row>
- <include
- latin:keyboardLayout="@xml/row_qwerty2" />
+ <Row
+ latin:keyWidth="9.0%p"
+ >
+ <include
+ latin:keyboardLayout="@xml/rowkeys_qwerty2"
+ latin:keyXPos="4.5%p" />
+ <Key
+ latin:keyStyle="enterKeyStyle"
+ latin:keyXPos="-14.6%p"
+ latin:keyWidth="fillBoth" />
+ </Row>
<Row
latin:keyWidth="8.9%p"
>
<Key
latin:keyStyle="shiftKeyStyle"
latin:keyWidth="10.0%p" />
- <Key
- latin:keyLabel="y"
- latin:moreKeys="@string/more_keys_for_y" />
- <Key
- latin:keyLabel="x" />
- <Key
- latin:keyLabel="c"
- latin:moreKeys="@string/more_keys_for_c" />
- <Key
- latin:keyLabel="v"
- latin:moreKeys="@string/more_keys_for_v" />
- <Key
- latin:keyLabel="b" />
- <Key
- latin:keyLabel="n"
- latin:moreKeys="@string/more_keys_for_n" />
- <Key
- latin:keyLabel="m" />
+ <include
+ latin:keyboardLayout="@xml/rowkeys_qwertz3" />
<include
latin:keyboardLayout="@xml/keys_comma_period" />
<include
diff --git a/java/res/xml-sw600dp/rows_scandinavian.xml b/java/res/xml-sw600dp/rows_scandinavian.xml
index 912c40658..df1e60fee 100644
--- a/java/res/xml-sw600dp/rows_scandinavian.xml
+++ b/java/res/xml-sw600dp/rows_scandinavian.xml
@@ -26,35 +26,8 @@
<Row
latin:keyWidth="7.9%p"
>
- <Key
- latin:keyLabel="q" />
- <Key
- latin:keyLabel="w" />
- <Key
- latin:keyLabel="e"
- latin:moreKeys="@string/more_keys_for_e" />
- <Key
- latin:keyLabel="r"
- latin:moreKeys="@string/more_keys_for_r" />
- <Key
- latin:keyLabel="t"
- latin:moreKeys="@string/more_keys_for_t" />
- <Key
- latin:keyLabel="y"
- latin:moreKeys="@string/more_keys_for_y" />
- <Key
- latin:keyLabel="u"
- latin:moreKeys="@string/more_keys_for_u" />
- <Key
- latin:keyLabel="i"
- latin:moreKeys="@string/more_keys_for_i" />
- <Key
- latin:keyLabel="o"
- latin:moreKeys="@string/more_keys_for_o" />
- <Key
- latin:keyLabel="p" />
- <Key
- latin:keyLabel="@string/keylabel_for_scandinavia_row1_11" />
+ <include
+ latin:keyboardLayout="@xml/rowkeys_scandinavian1" />
<Key
latin:keyStyle="deleteKeyStyle"
latin:keyXPos="-10.0%p"
@@ -63,37 +36,9 @@
<Row
latin:keyWidth="7.9%p"
>
- <Key
- latin:keyLabel="a"
- latin:keyXPos="3.5%p"
- latin:moreKeys="@string/more_keys_for_a" />
- <Key
- latin:keyLabel="s"
- latin:moreKeys="@string/more_keys_for_s" />
- <Key
- latin:keyLabel="d"
- latin:moreKeys="@string/more_keys_for_d" />
- <Key
- latin:keyLabel="f" />
- <Key
- latin:keyLabel="g"
- latin:moreKeys="@string/more_keys_for_g" />
- <Key
- latin:keyLabel="h" />
- <Key
- latin:keyLabel="j" />
- <Key
- latin:keyLabel="k"
- latin:moreKeys="@string/more_keys_for_k" />
- <Key
- latin:keyLabel="l"
- latin:moreKeys="@string/more_keys_for_l" />
- <Key
- latin:keyLabel="@string/keylabel_for_scandinavia_row2_10"
- latin:moreKeys="@string/more_keys_for_scandinavia_row2_10" />
- <Key
- latin:keyLabel="@string/keylabel_for_scandinavia_row2_11"
- latin:moreKeys="@string/more_keys_for_scandinavia_row2_11" />
+ <include
+ latin:keyboardLayout="@xml/rowkeys_scandinavian2"
+ latin:keyXPos="3.5%p" />
<Key
latin:keyStyle="enterKeyStyle"
latin:keyXPos="-14.6%p"
@@ -107,24 +52,8 @@
latin:keyWidth="10.0%p" />
<Spacer
latin:keyWidth="4.35%p" />
- <Key
- latin:keyLabel="z"
- latin:moreKeys="@string/more_keys_for_z" />
- <Key
- latin:keyLabel="x" />
- <Key
- latin:keyLabel="c"
- latin:moreKeys="@string/more_keys_for_c" />
- <Key
- latin:keyLabel="v"
- latin:moreKeys="@string/more_keys_for_v" />
- <Key
- latin:keyLabel="b" />
- <Key
- latin:keyLabel="n"
- latin:moreKeys="@string/more_keys_for_n" />
- <Key
- latin:keyLabel="m" />
+ <include
+ latin:keyboardLayout="@xml/rowkeys_qwerty3" />
<include
latin:keyboardLayout="@xml/keys_comma_period" />
<include
diff --git a/java/res/xml-sw600dp/rows_spanish.xml b/java/res/xml-sw600dp/rows_spanish.xml
index b6df257cb..a8f5524c2 100644
--- a/java/res/xml-sw600dp/rows_spanish.xml
+++ b/java/res/xml-sw600dp/rows_spanish.xml
@@ -23,46 +23,42 @@
>
<include
latin:keyboardLayout="@xml/key_styles_common" />
- <include
- latin:keyboardLayout="@xml/row_qwerty1" />
<Row
- latin:keyWidth="8.5%p"
+ latin:keyWidth="9.0%p"
>
+ <include
+ latin:keyboardLayout="@xml/rowkeys_qwerty1" />
<Key
- latin:keyLabel="a"
- latin:moreKeys="@string/more_keys_for_a"
+ latin:keyStyle="deleteKeyStyle"
+ latin:keyXPos="-10.0%p"
+ latin:keyWidth="fillBoth" />
+ </Row>
+ <Row
+ latin:keyWidth="8.5%p"
+ >
+ <include
+ latin:keyboardLayout="@xml/rowkeys_spanish2"
latin:keyXPos="5.0%p" />
<Key
- latin:keyLabel="s"
- latin:moreKeys="@string/more_keys_for_s" />
- <Key
- latin:keyLabel="d"
- latin:moreKeys="@string/more_keys_for_d" />
- <Key
- latin:keyLabel="f" />
- <Key
- latin:keyLabel="g"
- latin:moreKeys="@string/more_keys_for_g" />
- <Key
- latin:keyLabel="h" />
- <Key
- latin:keyLabel="j" />
- <Key
- latin:keyLabel="k"
- latin:moreKeys="@string/more_keys_for_k" />
- <Key
- latin:keyLabel="l"
- latin:moreKeys="@string/more_keys_for_l" />
- <!-- U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE -->
- <Key
- latin:keyLabel="&#x00F1;" />
- <Key
latin:keyStyle="enterKeyStyle"
latin:keyXPos="-14.6%p"
latin:keyWidth="fillBoth" />
</Row>
- <include
- latin:keyboardLayout="@xml/row_qwerty3" />
+ <Row
+ latin:keyWidth="8.9%p"
+ >
+ <Key
+ latin:keyStyle="shiftKeyStyle"
+ latin:keyWidth="10.0%p" />
+ <include
+ latin:keyboardLayout="@xml/rowkeys_qwerty3" />
+ <include
+ latin:keyboardLayout="@xml/keys_comma_period" />
+ <include
+ latin:keyboardLayout="@xml/key_smiley"
+ latin:keyXPos="-8.9%p"
+ latin:keyWidth="fillBoth" />
+ </Row>
<include
latin:keyboardLayout="@xml/row_qwerty4" />
</merge>
diff --git a/java/res/xml-sw768dp/row_qwerty1.xml b/java/res/xml-sw768dp/row_qwerty1.xml
deleted file mode 100644
index f6600ad03..000000000
--- a/java/res/xml-sw768dp/row_qwerty1.xml
+++ /dev/null
@@ -1,63 +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.
-*/
--->
-
-<merge
- xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
->
- <Row
- latin:keyWidth="8.282%p"
- >
- <Key
- latin:keyStyle="tabKeyStyle"
- latin:keyLabelFlags="alignLeft"
- latin:keyWidth="7.969%p" />
- <Key
- latin:keyLabel="q" />
- <Key
- latin:keyLabel="w" />
- <Key
- latin:keyLabel="e"
- latin:moreKeys="@string/more_keys_for_e" />
- <Key
- latin:keyLabel="r"
- latin:moreKeys="@string/more_keys_for_r" />
- <Key
- latin:keyLabel="t"
- latin:moreKeys="@string/more_keys_for_t" />
- <Key
- latin:keyLabel="y"
- latin:moreKeys="@string/more_keys_for_y" />
- <Key
- latin:keyLabel="u"
- latin:moreKeys="@string/more_keys_for_u" />
- <Key
- latin:keyLabel="i"
- latin:moreKeys="@string/more_keys_for_i" />
- <Key
- latin:keyLabel="o"
- latin:moreKeys="@string/more_keys_for_o" />
- <Key
- latin:keyLabel="p" />
- <Key
- latin:keyStyle="deleteKeyStyle"
- latin:keyXPos="-9.219%p"
- latin:keyWidth="fillBoth"/>
- </Row>
-</merge>
diff --git a/java/res/xml-sw768dp/row_qwerty2.xml b/java/res/xml-sw768dp/row_qwerty2.xml
deleted file mode 100644
index d348041fd..000000000
--- a/java/res/xml-sw768dp/row_qwerty2.xml
+++ /dev/null
@@ -1,60 +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.
-*/
--->
-
-<merge
- xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
->
- <Row
- latin:keyWidth="8.125%p"
- >
- <Key
- latin:keyStyle="toSymbolKeyStyle"
- latin:keyLabelFlags="alignLeft"
- latin:keyWidth="11.172%p"/>
- <Key
- latin:keyLabel="a"
- latin:moreKeys="@string/more_keys_for_a" />
- <Key
- latin:keyLabel="s"
- latin:moreKeys="@string/more_keys_for_s" />
- <Key
- latin:keyLabel="d"
- latin:moreKeys="@string/more_keys_for_d" />
- <Key
- latin:keyLabel="f" />
- <Key
- latin:keyLabel="g"
- latin:moreKeys="@string/more_keys_for_g" />
- <Key
- latin:keyLabel="h" />
- <Key
- latin:keyLabel="j" />
- <Key
- latin:keyLabel="k"
- latin:moreKeys="@string/more_keys_for_k" />
- <Key
- latin:keyLabel="l"
- latin:moreKeys="@string/more_keys_for_l" />
- <Key
- latin:keyStyle="enterKeyStyle"
- latin:keyXPos="-15.704%p"
- latin:keyWidth="fillBoth" />
- </Row>
-</merge>
diff --git a/java/res/xml-sw768dp/row_qwerty3.xml b/java/res/xml-sw768dp/row_qwerty3.xml
deleted file mode 100644
index e2bb2e546..000000000
--- a/java/res/xml-sw768dp/row_qwerty3.xml
+++ /dev/null
@@ -1,55 +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.
-*/
--->
-
-<merge
- xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
->
- <Row
- latin:keyWidth="8.047%p"
- >
- <Key
- latin:keyStyle="shiftKeyStyle"
- latin:keyWidth="13.829%p"/>
- <Key
- latin:keyLabel="z"
- latin:moreKeys="@string/more_keys_for_z" />
- <Key
- latin:keyLabel="x" />
- <Key
- latin:keyLabel="c"
- latin:moreKeys="@string/more_keys_for_c" />
- <Key
- latin:keyLabel="v"
- latin:moreKeys="@string/more_keys_for_v" />
- <Key
- latin:keyLabel="b" />
- <Key
- latin:keyLabel="n"
- latin:moreKeys="@string/more_keys_for_n" />
- <Key
- latin:keyLabel="m" />
- <include
- latin:keyboardLayout="@xml/keys_comma_period" />
- <Key
- latin:keyStyle="shiftKeyStyle"
- latin:keyXPos="-13.750%p"
- latin:keyWidth="fillBoth" />
- </Row>
-</merge>
diff --git a/java/res/xml-sw768dp/rows_qwerty.xml b/java/res/xml-sw768dp/rows_qwerty.xml
index 71be44e31..ea2bb362f 100644
--- a/java/res/xml-sw768dp/rows_qwerty.xml
+++ b/java/res/xml-sw768dp/rows_qwerty.xml
@@ -23,12 +23,49 @@
>
<include
latin:keyboardLayout="@xml/key_styles_common" />
- <include
- latin:keyboardLayout="@xml/row_qwerty1" />
- <include
- latin:keyboardLayout="@xml/row_qwerty2" />
- <include
- latin:keyboardLayout="@xml/row_qwerty3" />
+ <Row
+ latin:keyWidth="8.282%p"
+ >
+ <Key
+ latin:keyStyle="tabKeyStyle"
+ latin:keyLabelFlags="alignLeft"
+ latin:keyWidth="7.969%p" />
+ <include
+ latin:keyboardLayout="@xml/rowkeys_qwerty1" />
+ <Key
+ latin:keyStyle="deleteKeyStyle"
+ latin:keyXPos="-9.219%p"
+ latin:keyWidth="fillBoth"/>
+ </Row>
+ <Row
+ latin:keyWidth="8.125%p"
+ >
+ <Key
+ latin:keyStyle="toSymbolKeyStyle"
+ latin:keyLabelFlags="alignLeft"
+ latin:keyWidth="11.172%p"/>
+ <include
+ latin:keyboardLayout="@xml/rowkeys_qwerty2" />
+ <Key
+ latin:keyStyle="enterKeyStyle"
+ latin:keyXPos="-15.704%p"
+ latin:keyWidth="fillBoth" />
+ </Row>
+ <Row
+ latin:keyWidth="8.047%p"
+ >
+ <Key
+ latin:keyStyle="shiftKeyStyle"
+ latin:keyWidth="13.829%p"/>
+ <include
+ latin:keyboardLayout="@xml/rowkeys_qwerty3" />
+ <include
+ latin:keyboardLayout="@xml/keys_comma_period" />
+ <Key
+ latin:keyStyle="shiftKeyStyle"
+ latin:keyXPos="-13.750%p"
+ latin:keyWidth="fillBoth" />
+ </Row>
<include
latin:keyboardLayout="@xml/row_qwerty4" />
</merge>
diff --git a/java/res/xml-sw768dp/rows_qwertz.xml b/java/res/xml-sw768dp/rows_qwertz.xml
index 7056a94ea..790ac189c 100644
--- a/java/res/xml-sw768dp/rows_qwertz.xml
+++ b/java/res/xml-sw768dp/rows_qwertz.xml
@@ -30,64 +30,35 @@
latin:keyStyle="tabKeyStyle"
latin:keyLabelFlags="alignLeft"
latin:keyWidth="7.969%p" />
- <Key
- latin:keyLabel="q" />
- <Key
- latin:keyLabel="w" />
- <Key
- latin:keyLabel="e"
- latin:moreKeys="@string/more_keys_for_e" />
- <Key
- latin:keyLabel="r"
- latin:moreKeys="@string/more_keys_for_r" />
- <Key
- latin:keyLabel="t"
- latin:moreKeys="@string/more_keys_for_t" />
- <Key
- latin:keyLabel="z"
- latin:moreKeys="@string/more_keys_for_z" />
- <Key
- latin:keyLabel="u"
- latin:moreKeys="@string/more_keys_for_u" />
- <Key
- latin:keyLabel="i"
- latin:moreKeys="@string/more_keys_for_i" />
- <Key
- latin:keyLabel="o"
- latin:moreKeys="@string/more_keys_for_o" />
- <Key
- latin:keyLabel="p" />
+ <include
+ latin:keyboardLayout="@xml/rowkeys_qwertz1" />
<Key
latin:keyStyle="deleteKeyStyle"
latin:keyXPos="-9.219%p"
+ latin:keyWidth="fillBoth"/>
+ </Row>
+ <Row
+ latin:keyWidth="8.125%p"
+ >
+ <Key
+ latin:keyStyle="toSymbolKeyStyle"
+ latin:keyLabelFlags="alignLeft"
+ latin:keyWidth="11.172%p"/>
+ <include
+ latin:keyboardLayout="@xml/rowkeys_qwerty2" />
+ <Key
+ latin:keyStyle="enterKeyStyle"
+ latin:keyXPos="-15.704%p"
latin:keyWidth="fillBoth" />
</Row>
- <include
- latin:keyboardLayout="@xml/row_qwerty2" />
<Row
latin:keyWidth="8.047%p"
>
<Key
latin:keyStyle="shiftKeyStyle"
- latin:keyWidth="13.829%p" />
- <Key
- latin:keyLabel="y"
- latin:moreKeys="@string/more_keys_for_y" />
- <Key
- latin:keyLabel="x" />
- <Key
- latin:keyLabel="c"
- latin:moreKeys="@string/more_keys_for_c" />
- <Key
- latin:keyLabel="v"
- latin:moreKeys="@string/more_keys_for_v" />
- <Key
- latin:keyLabel="b" />
- <Key
- latin:keyLabel="n"
- latin:moreKeys="@string/more_keys_for_n" />
- <Key
- latin:keyLabel="m" />
+ latin:keyWidth="13.829%p"/>
+ <include
+ latin:keyboardLayout="@xml/rowkeys_qwertz3" />
<include
latin:keyboardLayout="@xml/keys_comma_period" />
<Key
@@ -95,6 +66,6 @@
latin:keyXPos="-13.750%p"
latin:keyWidth="fillBoth" />
</Row>
- <include
+ <include
latin:keyboardLayout="@xml/row_qwerty4" />
</merge>
diff --git a/java/res/xml-sw768dp/rows_scandinavian.xml b/java/res/xml-sw768dp/rows_scandinavian.xml
index 437316699..f7e013b57 100644
--- a/java/res/xml-sw768dp/rows_scandinavian.xml
+++ b/java/res/xml-sw768dp/rows_scandinavian.xml
@@ -30,35 +30,8 @@
latin:keyStyle="tabKeyStyle"
latin:keyLabelFlags="alignLeft"
latin:keyWidth="7.500%p" />
- <Key
- latin:keyLabel="q" />
- <Key
- latin:keyLabel="w" />
- <Key
- latin:keyLabel="e"
- latin:moreKeys="@string/more_keys_for_e" />
- <Key
- latin:keyLabel="r"
- latin:moreKeys="@string/more_keys_for_r" />
- <Key
- latin:keyLabel="t"
- latin:moreKeys="@string/more_keys_for_t" />
- <Key
- latin:keyLabel="y"
- latin:moreKeys="@string/more_keys_for_y" />
- <Key
- latin:keyLabel="u"
- latin:moreKeys="@string/more_keys_for_u" />
- <Key
- latin:keyLabel="i"
- latin:moreKeys="@string/more_keys_for_i" />
- <Key
- latin:keyLabel="o"
- latin:moreKeys="@string/more_keys_for_o" />
- <Key
- latin:keyLabel="p" />
- <Key
- latin:keyLabel="@string/keylabel_for_scandinavia_row1_11" />
+ <include
+ latin:keyboardLayout="@xml/rowkeys_scandinavian1" />
<Key
latin:keyStyle="deleteKeyStyle"
latin:keyXPos="-11.500%p"
@@ -71,36 +44,8 @@
latin:keyStyle="toSymbolKeyStyle"
latin:keyLabelFlags="alignLeft"
latin:keyWidth="9.375%p" />
- <Key
- latin:keyLabel="a"
- latin:moreKeys="@string/more_keys_for_a" />
- <Key
- latin:keyLabel="s"
- latin:moreKeys="@string/more_keys_for_s" />
- <Key
- latin:keyLabel="d"
- latin:moreKeys="@string/more_keys_for_d" />
- <Key
- latin:keyLabel="f" />
- <Key
- latin:keyLabel="g"
- latin:moreKeys="@string/more_keys_for_g" />
- <Key
- latin:keyLabel="h" />
- <Key
- latin:keyLabel="j" />
- <Key
- latin:keyLabel="k"
- latin:moreKeys="@string/more_keys_for_k" />
- <Key
- latin:keyLabel="l"
- latin:moreKeys="@string/more_keys_for_l" />
- <Key
- latin:keyLabel="@string/keylabel_for_scandinavia_row2_10"
- latin:moreKeys="@string/more_keys_for_scandinavia_row2_10" />
- <Key
- latin:keyLabel="@string/keylabel_for_scandinavia_row2_11"
- latin:moreKeys="@string/more_keys_for_scandinavia_row2_11" />
+ <include
+ latin:keyboardLayout="@xml/rowkeys_scandinavian2" />
<Key
latin:keyStyle="enterKeyStyle"
latin:keyXPos="-9.375%p"
@@ -112,24 +57,8 @@
<Key
latin:keyStyle="shiftKeyStyle"
latin:keyWidth="12.750%p" />
- <Key
- latin:keyLabel="z"
- latin:moreKeys="@string/more_keys_for_z" />
- <Key
- latin:keyLabel="x" />
- <Key
- latin:keyLabel="c"
- latin:moreKeys="@string/more_keys_for_c" />
- <Key
- latin:keyLabel="v"
- latin:moreKeys="@string/more_keys_for_v" />
- <Key
- latin:keyLabel="b" />
- <Key
- latin:keyLabel="n"
- latin:moreKeys="@string/more_keys_for_n" />
- <Key
- latin:keyLabel="m" />
+ <include
+ latin:keyboardLayout="@xml/rowkeys_qwerty3" />
<include
latin:keyboardLayout="@xml/keys_comma_period" />
<Key
diff --git a/java/res/xml-sw768dp/rows_spanish.xml b/java/res/xml-sw768dp/rows_spanish.xml
index 9fe1b3b4b..683472cf4 100644
--- a/java/res/xml-sw768dp/rows_spanish.xml
+++ b/java/res/xml-sw768dp/rows_spanish.xml
@@ -23,8 +23,20 @@
>
<include
latin:keyboardLayout="@xml/key_styles_common" />
- <include
- latin:keyboardLayout="@xml/row_qwerty1" />
+ <Row
+ latin:keyWidth="8.282%p"
+ >
+ <Key
+ latin:keyStyle="tabKeyStyle"
+ latin:keyLabelFlags="alignLeft"
+ latin:keyWidth="7.969%p" />
+ <include
+ latin:keyboardLayout="@xml/rowkeys_qwerty1" />
+ <Key
+ latin:keyStyle="deleteKeyStyle"
+ latin:keyXPos="-9.219%p"
+ latin:keyWidth="fillBoth"/>
+ </Row>
<Row
latin:keyWidth="8.125%p"
>
@@ -32,40 +44,28 @@
latin:keyStyle="toSymbolKeyStyle"
latin:keyLabelFlags="alignLeft"
latin:keyWidth="10.167%p" />
- <Key
- latin:keyLabel="a"
- latin:moreKeys="@string/more_keys_for_a" />
- <Key
- latin:keyLabel="s"
- latin:moreKeys="@string/more_keys_for_s" />
- <Key
- latin:keyLabel="d"
- latin:moreKeys="@string/more_keys_for_d" />
- <Key
- latin:keyLabel="f" />
- <Key
- latin:keyLabel="g"
- latin:moreKeys="@string/more_keys_for_g" />
- <Key
- latin:keyLabel="h" />
- <Key
- latin:keyLabel="j" />
- <Key
- latin:keyLabel="k"
- latin:moreKeys="@string/more_keys_for_k" />
- <Key
- latin:keyLabel="l"
- latin:moreKeys="@string/more_keys_for_l" />
- <!-- U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE -->
- <Key
- latin:keyLabel="&#x00F1;" />
+ <include
+ latin:keyboardLayout="@xml/rowkeys_spanish2" />
<Key
latin:keyStyle="enterKeyStyle"
latin:keyXPos="-15.704%p"
latin:keyWidth="fillBoth" />
</Row>
- <include
- latin:keyboardLayout="@xml/row_qwerty3" />
+ <Row
+ latin:keyWidth="8.047%p"
+ >
+ <Key
+ latin:keyStyle="shiftKeyStyle"
+ latin:keyWidth="13.829%p"/>
+ <include
+ latin:keyboardLayout="@xml/rowkeys_qwerty3" />
+ <include
+ latin:keyboardLayout="@xml/keys_comma_period" />
+ <Key
+ latin:keyStyle="shiftKeyStyle"
+ latin:keyXPos="-13.750%p"
+ latin:keyWidth="fillBoth" />
+ </Row>
<include
latin:keyboardLayout="@xml/row_qwerty4" />
</merge>
diff --git a/java/res/xml/row_qwerty1.xml b/java/res/xml/row_qwerty1.xml
deleted file mode 100644
index cb1f4d297..000000000
--- a/java/res/xml/row_qwerty1.xml
+++ /dev/null
@@ -1,76 +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.
-*/
--->
-
-<merge
- xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
->
- <Row
- latin:keyWidth="10%p"
- >
- <Key
- latin:keyLabel="q"
- latin:keyHintLabel="1"
- latin:additionalMoreKeys="1" />
- <Key
- latin:keyLabel="w"
- latin:keyHintLabel="2"
- latin:additionalMoreKeys="2" />
- <Key
- latin:keyLabel="e"
- latin:keyHintLabel="3"
- latin:additionalMoreKeys="3"
- latin:moreKeys="@string/more_keys_for_e" />
- <Key
- latin:keyLabel="r"
- latin:keyHintLabel="4"
- latin:additionalMoreKeys="4"
- latin:moreKeys="@string/more_keys_for_r" />
- <Key
- latin:keyLabel="t"
- latin:keyHintLabel="5"
- latin:additionalMoreKeys="5"
- latin:moreKeys="@string/more_keys_for_t" />
- <Key
- latin:keyLabel="y"
- latin:keyHintLabel="6"
- latin:additionalMoreKeys="6"
- latin:moreKeys="@string/more_keys_for_y" />
- <Key
- latin:keyLabel="u"
- latin:keyHintLabel="7"
- latin:additionalMoreKeys="7"
- latin:moreKeys="@string/more_keys_for_u" />
- <Key
- latin:keyLabel="i"
- latin:keyHintLabel="8"
- latin:additionalMoreKeys="8"
- latin:moreKeys="@string/more_keys_for_i" />
- <Key
- latin:keyLabel="o"
- latin:keyHintLabel="9"
- latin:additionalMoreKeys="9"
- latin:moreKeys="@string/more_keys_for_o" />
- <Key
- latin:keyLabel="p"
- latin:keyHintLabel="0"
- latin:additionalMoreKeys="0"
- latin:keyWidth="fillRight" />
- </Row>
-</merge>
diff --git a/java/res/xml/row_qwerty2.xml b/java/res/xml/row_qwerty2.xml
deleted file mode 100644
index 8986780b7..000000000
--- a/java/res/xml/row_qwerty2.xml
+++ /dev/null
@@ -1,54 +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.
-*/
--->
-
-<merge
- xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
->
- <Row
- latin:keyWidth="10%p"
- >
- <Key
- latin:keyLabel="a"
- latin:moreKeys="@string/more_keys_for_a"
- latin:keyXPos="5%p" />
- <Key
- latin:keyLabel="s"
- latin:moreKeys="@string/more_keys_for_s" />
- <Key
- latin:keyLabel="d"
- latin:moreKeys="@string/more_keys_for_d" />
- <Key
- latin:keyLabel="f" />
- <Key
- latin:keyLabel="g"
- latin:moreKeys="@string/more_keys_for_g" />
- <Key
- latin:keyLabel="h" />
- <Key
- latin:keyLabel="j" />
- <Key
- latin:keyLabel="k"
- latin:moreKeys="@string/more_keys_for_k" />
- <Key
- latin:keyLabel="l"
- latin:moreKeys="@string/more_keys_for_l" />
- <!-- Here is 5%p space -->
- </Row>
-</merge>
diff --git a/java/res/xml/row_qwerty3.xml b/java/res/xml/row_qwerty3.xml
deleted file mode 100644
index c2b45e752..000000000
--- a/java/res/xml/row_qwerty3.xml
+++ /dev/null
@@ -1,54 +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.
-*/
--->
-
-<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" />
- <Key
- latin:keyLabel="z"
- latin:moreKeys="@string/more_keys_for_z" />
- <Key
- latin:keyLabel="x" />
- <Key
- latin:keyLabel="c"
- latin:moreKeys="@string/more_keys_for_c" />
- <Key
- latin:keyLabel="v"
- latin:moreKeys="@string/more_keys_for_v" />
- <Key
- latin:keyLabel="b" />
- <Key
- latin:keyLabel="n"
- latin:moreKeys="@string/more_keys_for_n" />
- <Key
- latin:keyLabel="m" />
- <Key
- latin:keyStyle="deleteKeyStyle"
- latin:keyWidth="fillBoth"
- latin:visualInsetsLeft="1%p" />
- </Row>
-</merge>
diff --git a/java/res/xml/rowkeys_qwerty1.xml b/java/res/xml/rowkeys_qwerty1.xml
new file mode 100644
index 000000000..bd5e9a271
--- /dev/null
+++ b/java/res/xml/rowkeys_qwerty1.xml
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2012, 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
+ latin:keyLabel="q"
+ latin:keyHintLabel="1"
+ latin:additionalMoreKeys="1" />
+ <Key
+ latin:keyLabel="w"
+ latin:keyHintLabel="2"
+ latin:additionalMoreKeys="2" />
+ <Key
+ latin:keyLabel="e"
+ latin:keyHintLabel="3"
+ latin:additionalMoreKeys="3"
+ latin:moreKeys="@string/more_keys_for_e" />
+ <Key
+ latin:keyLabel="r"
+ latin:keyHintLabel="4"
+ latin:additionalMoreKeys="4"
+ latin:moreKeys="@string/more_keys_for_r" />
+ <Key
+ latin:keyLabel="t"
+ latin:keyHintLabel="5"
+ latin:additionalMoreKeys="5"
+ latin:moreKeys="@string/more_keys_for_t" />
+ <Key
+ latin:keyLabel="y"
+ latin:keyHintLabel="6"
+ latin:additionalMoreKeys="6"
+ latin:moreKeys="@string/more_keys_for_y" />
+ <Key
+ latin:keyLabel="u"
+ latin:keyHintLabel="7"
+ latin:additionalMoreKeys="7"
+ latin:moreKeys="@string/more_keys_for_u" />
+ <Key
+ latin:keyLabel="i"
+ latin:keyHintLabel="8"
+ latin:additionalMoreKeys="8"
+ latin:moreKeys="@string/more_keys_for_i" />
+ <Key
+ latin:keyLabel="o"
+ latin:keyHintLabel="9"
+ latin:additionalMoreKeys="9"
+ latin:moreKeys="@string/more_keys_for_o" />
+ <Key
+ latin:keyLabel="p"
+ latin:keyHintLabel="0"
+ latin:additionalMoreKeys="0" />
+</merge>
diff --git a/java/res/xml/rowkeys_qwerty2.xml b/java/res/xml/rowkeys_qwerty2.xml
new file mode 100644
index 000000000..4c983dfce
--- /dev/null
+++ b/java/res/xml/rowkeys_qwerty2.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2012, 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
+ latin:keyLabel="a"
+ latin:moreKeys="@string/more_keys_for_a" />
+ <Key
+ latin:keyLabel="s"
+ latin:moreKeys="@string/more_keys_for_s" />
+ <Key
+ latin:keyLabel="d"
+ latin:moreKeys="@string/more_keys_for_d" />
+ <Key
+ latin:keyLabel="f" />
+ <Key
+ latin:keyLabel="g"
+ latin:moreKeys="@string/more_keys_for_g" />
+ <Key
+ latin:keyLabel="h" />
+ <Key
+ latin:keyLabel="j" />
+ <Key
+ latin:keyLabel="k"
+ latin:moreKeys="@string/more_keys_for_k" />
+ <Key
+ latin:keyLabel="l"
+ latin:moreKeys="@string/more_keys_for_l" />
+</merge>
diff --git a/java/res/xml/rowkeys_qwerty3.xml b/java/res/xml/rowkeys_qwerty3.xml
new file mode 100644
index 000000000..932ea6f65
--- /dev/null
+++ b/java/res/xml/rowkeys_qwerty3.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2012, 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
+ latin:keyLabel="z"
+ latin:moreKeys="@string/more_keys_for_z" />
+ <Key
+ latin:keyLabel="x" />
+ <Key
+ latin:keyLabel="c"
+ latin:moreKeys="@string/more_keys_for_c" />
+ <Key
+ latin:keyLabel="v"
+ latin:moreKeys="@string/more_keys_for_v" />
+ <Key
+ latin:keyLabel="b" />
+ <Key
+ latin:keyLabel="n"
+ latin:moreKeys="@string/more_keys_for_n" />
+ <Key
+ latin:keyLabel="m" />
+</merge>
diff --git a/java/res/xml/rowkeys_qwertz1.xml b/java/res/xml/rowkeys_qwertz1.xml
new file mode 100644
index 000000000..27b8a7653
--- /dev/null
+++ b/java/res/xml/rowkeys_qwertz1.xml
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2012, 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
+ latin:keyLabel="q"
+ latin:keyHintLabel="1"
+ latin:additionalMoreKeys="1" />
+ <Key
+ latin:keyLabel="w"
+ latin:keyHintLabel="2"
+ latin:additionalMoreKeys="2" />
+ <Key
+ latin:keyLabel="e"
+ latin:keyHintLabel="3"
+ latin:additionalMoreKeys="3"
+ latin:moreKeys="@string/more_keys_for_e" />
+ <Key
+ latin:keyLabel="r"
+ latin:keyHintLabel="4"
+ latin:additionalMoreKeys="4"
+ latin:moreKeys="@string/more_keys_for_r" />
+ <Key
+ latin:keyLabel="t"
+ latin:keyHintLabel="5"
+ latin:additionalMoreKeys="5"
+ latin:moreKeys="@string/more_keys_for_t" />
+ <Key
+ latin:keyLabel="z"
+ latin:keyHintLabel="6"
+ latin:additionalMoreKeys="6"
+ latin:moreKeys="@string/more_keys_for_z" />
+ <Key
+ latin:keyLabel="u"
+ latin:keyHintLabel="7"
+ latin:additionalMoreKeys="7"
+ latin:moreKeys="@string/more_keys_for_u" />
+ <Key
+ latin:keyLabel="i"
+ latin:keyHintLabel="8"
+ latin:additionalMoreKeys="8"
+ latin:moreKeys="@string/more_keys_for_i" />
+ <Key
+ latin:keyLabel="o"
+ latin:keyHintLabel="9"
+ latin:additionalMoreKeys="9"
+ latin:moreKeys="@string/more_keys_for_o" />
+ <Key
+ latin:keyLabel="p"
+ latin:keyHintLabel="0"
+ latin:additionalMoreKeys="0" />
+</merge>
diff --git a/java/res/xml/rowkeys_qwertz3.xml b/java/res/xml/rowkeys_qwertz3.xml
new file mode 100644
index 000000000..d37cee67f
--- /dev/null
+++ b/java/res/xml/rowkeys_qwertz3.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2012, 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
+ latin:keyLabel="y"
+ latin:moreKeys="@string/more_keys_for_y" />
+ <Key
+ latin:keyLabel="x" />
+ <Key
+ latin:keyLabel="c"
+ latin:moreKeys="@string/more_keys_for_c" />
+ <Key
+ latin:keyLabel="v"
+ latin:moreKeys="@string/more_keys_for_v" />
+ <Key
+ latin:keyLabel="b" />
+ <Key
+ latin:keyLabel="n"
+ latin:moreKeys="@string/more_keys_for_n" />
+ <Key
+ latin:keyLabel="m" />
+</merge>
diff --git a/java/res/xml/rowkeys_scandinavian1.xml b/java/res/xml/rowkeys_scandinavian1.xml
new file mode 100644
index 000000000..355b62654
--- /dev/null
+++ b/java/res/xml/rowkeys_scandinavian1.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2012, 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_qwerty1" />
+ <Key
+ latin:keyLabel="@string/keylabel_for_scandinavia_row1_11" />
+</merge>
diff --git a/java/res/xml/rowkeys_scandinavian2.xml b/java/res/xml/rowkeys_scandinavian2.xml
new file mode 100644
index 000000000..58e6bc2e7
--- /dev/null
+++ b/java/res/xml/rowkeys_scandinavian2.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2012, 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" />
+ <Key
+ latin:keyLabel="@string/keylabel_for_scandinavia_row2_10"
+ latin:moreKeys="@string/more_keys_for_scandinavia_row2_10" />
+ <Key
+ latin:keyLabel="@string/keylabel_for_scandinavia_row2_11"
+ latin:moreKeys="@string/more_keys_for_scandinavia_row2_11" />
+</merge>
diff --git a/java/res/xml/rowkeys_spanish2.xml b/java/res/xml/rowkeys_spanish2.xml
new file mode 100644
index 000000000..4c7e57997
--- /dev/null
+++ b/java/res/xml/rowkeys_spanish2.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2012, 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+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE -->
+ <Key
+ latin:keyLabel="&#x00F1;" />
+ </merge>
diff --git a/java/res/xml/rows_qwerty.xml b/java/res/xml/rows_qwerty.xml
index 71be44e31..716d10642 100644
--- a/java/res/xml/rows_qwerty.xml
+++ b/java/res/xml/rows_qwerty.xml
@@ -23,12 +23,33 @@
>
<include
latin:keyboardLayout="@xml/key_styles_common" />
- <include
- latin:keyboardLayout="@xml/row_qwerty1" />
- <include
- latin:keyboardLayout="@xml/row_qwerty2" />
- <include
- latin:keyboardLayout="@xml/row_qwerty3" />
+ <Row
+ latin:keyWidth="10%p"
+ >
+ <include
+ latin:keyboardLayout="@xml/rowkeys_qwerty1" />
+ </Row>
+ <Row
+ latin:keyWidth="10%p"
+ >
+ <include
+ latin:keyboardLayout="@xml/rowkeys_qwerty2"
+ latin:keyXPos="5%p" />
+ </Row>
+ <Row
+ latin:keyWidth="10%p"
+ >
+ <Key
+ latin:keyStyle="shiftKeyStyle"
+ latin:keyWidth="15%p"
+ latin:visualInsetsRight="1%p" />
+ <include
+ latin:keyboardLayout="@xml/rowkeys_qwerty3" />
+ <Key
+ latin:keyStyle="deleteKeyStyle"
+ latin:keyWidth="fillBoth"
+ latin:visualInsetsLeft="1%p" />
+ </Row>
<include
latin:keyboardLayout="@xml/row_qwerty4" />
</merge>
diff --git a/java/res/xml/rows_qwertz.xml b/java/res/xml/rows_qwertz.xml
index 11fd9332c..31a147c12 100644
--- a/java/res/xml/rows_qwertz.xml
+++ b/java/res/xml/rows_qwertz.xml
@@ -26,57 +26,16 @@
<Row
latin:keyWidth="10%p"
>
- <Key
- latin:keyLabel="q"
- latin:keyHintLabel="1"
- latin:additionalMoreKeys="1" />
- <Key
- latin:keyLabel="w"
- latin:keyHintLabel="2"
- latin:additionalMoreKeys="2" />
- <Key
- latin:keyLabel="e"
- latin:keyHintLabel="3"
- latin:additionalMoreKeys="3"
- latin:moreKeys="@string/more_keys_for_e" />
- <Key
- latin:keyLabel="r"
- latin:keyHintLabel="4"
- latin:additionalMoreKeys="4"
- latin:moreKeys="@string/more_keys_for_r" />
- <Key
- latin:keyLabel="t"
- latin:keyHintLabel="5"
- latin:additionalMoreKeys="5"
- latin:moreKeys="@string/more_keys_for_t" />
- <Key
- latin:keyLabel="z"
- latin:keyHintLabel="6"
- latin:additionalMoreKeys="6"
- latin:moreKeys="@string/more_keys_for_z" />
- <Key
- latin:keyLabel="u"
- latin:keyHintLabel="7"
- latin:additionalMoreKeys="7"
- latin:moreKeys="@string/more_keys_for_u" />
- <Key
- latin:keyLabel="i"
- latin:keyHintLabel="8"
- latin:additionalMoreKeys="8"
- latin:moreKeys="@string/more_keys_for_i" />
- <Key
- latin:keyLabel="o"
- latin:keyHintLabel="9"
- latin:additionalMoreKeys="9"
- latin:moreKeys="@string/more_keys_for_o" />
- <Key
- latin:keyLabel="p"
- latin:keyHintLabel="0"
- latin:additionalMoreKeys="0"
- latin:keyWidth="fillRight" />
+ <include
+ latin:keyboardLayout="@xml/rowkeys_qwertz1" />
+ </Row>
+ <Row
+ latin:keyWidth="10%p"
+ >
+ <include
+ latin:keyboardLayout="@xml/rowkeys_qwerty2"
+ latin:keyXPos="5%p" />
</Row>
- <include
- latin:keyboardLayout="@xml/row_qwerty2" />
<Row
latin:keyWidth="10%p"
>
@@ -84,24 +43,8 @@
latin:keyStyle="shiftKeyStyle"
latin:keyWidth="15%p"
latin:visualInsetsRight="1%p" />
- <Key
- latin:keyLabel="y"
- latin:moreKeys="@string/more_keys_for_y" />
- <Key
- latin:keyLabel="x" />
- <Key
- latin:keyLabel="c"
- latin:moreKeys="@string/more_keys_for_c" />
- <Key
- latin:keyLabel="v"
- latin:moreKeys="@string/more_keys_for_v" />
- <Key
- latin:keyLabel="b" />
- <Key
- latin:keyLabel="n"
- latin:moreKeys="@string/more_keys_for_n" />
- <Key
- latin:keyLabel="m" />
+ <include
+ latin:keyboardLayout="@xml/rowkeys_qwertz3" />
<Key
latin:keyStyle="deleteKeyStyle"
latin:keyWidth="fillRight"
diff --git a/java/res/xml/rows_scandinavian.xml b/java/res/xml/rows_scandinavian.xml
index f5ba96c27..45642f4be 100644
--- a/java/res/xml/rows_scandinavian.xml
+++ b/java/res/xml/rows_scandinavian.xml
@@ -26,94 +26,29 @@
<Row
latin:keyWidth="9.091%p"
>
- <Key
- latin:keyLabel="q"
- latin:keyHintLabel="1"
- latin:additionalMoreKeys="1" />
- <Key
- latin:keyLabel="w"
- latin:keyHintLabel="2"
- latin:additionalMoreKeys="2" />
- <Key
- latin:keyLabel="e"
- latin:keyHintLabel="3"
- latin:additionalMoreKeys="3"
- latin:moreKeys="@string/more_keys_for_e" />
- <Key
- latin:keyLabel="r"
- latin:keyHintLabel="4"
- latin:additionalMoreKeys="4"
- latin:moreKeys="@string/more_keys_for_r" />
- <Key
- latin:keyLabel="t"
- latin:keyHintLabel="5"
- latin:additionalMoreKeys="5"
- latin:moreKeys="@string/more_keys_for_t" />
- <Key
- latin:keyLabel="y"
- latin:keyHintLabel="6"
- latin:additionalMoreKeys="6"
- latin:moreKeys="@string/more_keys_for_y" />
- <Key
- latin:keyLabel="u"
- latin:keyHintLabel="7"
- latin:additionalMoreKeys="7"
- latin:moreKeys="@string/more_keys_for_u" />
- <Key
- latin:keyLabel="i"
- latin:keyHintLabel="8"
- latin:additionalMoreKeys="8"
- latin:moreKeys="@string/more_keys_for_i" />
- <Key
- latin:keyLabel="o"
- latin:keyHintLabel="9"
- latin:additionalMoreKeys="9"
- latin:moreKeys="@string/more_keys_for_o" />
- <Key
- latin:keyLabel="p"
- latin:keyHintLabel="0"
- latin:additionalMoreKeys="0" />
- <Key
- latin:keyLabel="@string/keylabel_for_scandinavia_row1_11"
- latin:keyWidth="fillRight" />
+ <include
+ latin:keyboardLayout="@xml/rowkeys_scandinavian1" />
</Row>
<Row
latin:keyWidth="9.091%p"
>
+ <include
+ latin:keyboardLayout="@xml/rowkeys_scandinavian2" />
+ </Row>
+ <Row
+ latin:keyWidth="10%p"
+ >
<Key
- latin:keyLabel="a"
- latin:moreKeys="@string/more_keys_for_a" />
- <Key
- latin:keyLabel="s"
- latin:moreKeys="@string/more_keys_for_s" />
- <Key
- latin:keyLabel="d"
- latin:moreKeys="@string/more_keys_for_d" />
- <Key
- latin:keyLabel="f" />
- <Key
- latin:keyLabel="g"
- latin:moreKeys="@string/more_keys_for_g" />
- <Key
- latin:keyLabel="h" />
- <Key
- latin:keyLabel="j" />
- <Key
- latin:keyLabel="k"
- latin:moreKeys="@string/more_keys_for_k" />
- <Key
- latin:keyLabel="l"
- latin:moreKeys="@string/more_keys_for_l" />
- <Key
- latin:keyLabel="@string/keylabel_for_scandinavia_row2_10"
- latin:moreKeys="@string/more_keys_for_scandinavia_row2_10" />
+ latin:keyStyle="shiftKeyStyle"
+ latin:keyWidth="15%p"
+ latin:visualInsetsRight="1%p" />
+ <include
+ latin:keyboardLayout="@xml/rowkeys_qwerty3" />
<Key
- latin:keyLabel="@string/keylabel_for_scandinavia_row2_11"
- latin:moreKeys="@string/more_keys_for_scandinavia_row2_11"
- latin:keyWidth="fillRight" />
+ latin:keyStyle="deleteKeyStyle"
+ latin:keyWidth="fillBoth"
+ latin:visualInsetsLeft="1%p" />
</Row>
<include
- latin:keyboardLayout="@xml/row_qwerty3" />
- <include
latin:keyboardLayout="@xml/row_qwerty4" />
</merge>
diff --git a/java/res/xml/rows_spanish.xml b/java/res/xml/rows_spanish.xml
index 5831a2bef..b311297dd 100644
--- a/java/res/xml/rows_spanish.xml
+++ b/java/res/xml/rows_spanish.xml
@@ -23,41 +23,32 @@
>
<include
latin:keyboardLayout="@xml/key_styles_common" />
- <include
- latin:keyboardLayout="@xml/row_qwerty1" />
+ <Row
+ latin:keyWidth="10%p"
+ >
+ <include
+ latin:keyboardLayout="@xml/rowkeys_qwerty1" />
+ </Row>
+ <Row
+ latin:keyWidth="10%p"
+ >
+ <include
+ latin:keyboardLayout="@xml/rowkeys_spanish2" />
+ </Row>
<Row
latin:keyWidth="10%p"
>
<Key
- latin:keyLabel="a"
- latin:moreKeys="@string/more_keys_for_a" />
- <Key
- latin:keyLabel="s"
- latin:moreKeys="@string/more_keys_for_s" />
- <Key
- latin:keyLabel="d"
- latin:moreKeys="@string/more_keys_for_d" />
- <Key
- latin:keyLabel="f" />
- <Key
- latin:keyLabel="g"
- latin:moreKeys="@string/more_keys_for_g" />
- <Key
- latin:keyLabel="h" />
- <Key
- latin:keyLabel="j" />
- <Key
- latin:keyLabel="k"
- latin:moreKeys="@string/more_keys_for_k" />
- <Key
- latin:keyLabel="l"
- latin:moreKeys="@string/more_keys_for_l" />
- <!-- U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE -->
+ latin:keyStyle="shiftKeyStyle"
+ latin:keyWidth="15%p"
+ latin:visualInsetsRight="1%p" />
+ <include
+ latin:keyboardLayout="@xml/rowkeys_qwerty3" />
<Key
- latin:keyLabel="&#x00F1;" />
+ latin:keyStyle="deleteKeyStyle"
+ latin:keyWidth="fillBoth"
+ latin:visualInsetsLeft="1%p" />
</Row>
<include
- latin:keyboardLayout="@xml/row_qwerty3" />
- <include
latin:keyboardLayout="@xml/row_qwerty4" />
</merge>
diff --git a/java/src/com/android/inputmethod/latin/AutoCorrection.java b/java/src/com/android/inputmethod/latin/AutoCorrection.java
index 9754d1517..9c35f8f6f 100644
--- a/java/src/com/android/inputmethod/latin/AutoCorrection.java
+++ b/java/src/com/android/inputmethod/latin/AutoCorrection.java
@@ -32,15 +32,15 @@ public class AutoCorrection {
public static CharSequence computeAutoCorrectionWord(Map<String, Dictionary> dictionaries,
WordComposer wordComposer, ArrayList<CharSequence> suggestions, int[] sortedScores,
- CharSequence typedWord, double autoCorrectionThreshold, int correctionMode,
+ CharSequence consideredWord, double autoCorrectionThreshold,
CharSequence whitelistedWord) {
if (hasAutoCorrectionForWhitelistedWord(whitelistedWord)) {
return whitelistedWord;
- } else if (hasAutoCorrectionForTypedWord(
- dictionaries, wordComposer, suggestions, typedWord, correctionMode)) {
- return typedWord;
- } else if (hasAutoCorrectionForBinaryDictionary(wordComposer, suggestions, correctionMode,
- sortedScores, typedWord, autoCorrectionThreshold)) {
+ } else if (hasAutoCorrectionForConsideredWord(
+ dictionaries, wordComposer, suggestions, consideredWord)) {
+ return consideredWord;
+ } else if (hasAutoCorrectionForBinaryDictionary(wordComposer, suggestions,
+ sortedScores, consideredWord, autoCorrectionThreshold)) {
return suggestions.get(0);
}
return null;
@@ -87,31 +87,27 @@ public class AutoCorrection {
return whiteListedWord != null;
}
- private static boolean hasAutoCorrectionForTypedWord(Map<String, Dictionary> dictionaries,
- WordComposer wordComposer, ArrayList<CharSequence> suggestions, CharSequence typedWord,
- int correctionMode) {
- if (TextUtils.isEmpty(typedWord)) return false;
+ private static boolean hasAutoCorrectionForConsideredWord(Map<String, Dictionary> dictionaries,
+ WordComposer wordComposer, ArrayList<CharSequence> suggestions,
+ CharSequence consideredWord) {
+ if (TextUtils.isEmpty(consideredWord)) return false;
return wordComposer.size() > 1 && suggestions.size() > 0
- && !allowsToBeAutoCorrected(dictionaries, typedWord, false)
- && (correctionMode == Suggest.CORRECTION_FULL
- || correctionMode == Suggest.CORRECTION_FULL_BIGRAM);
+ && !allowsToBeAutoCorrected(dictionaries, consideredWord, false);
}
private static boolean hasAutoCorrectionForBinaryDictionary(WordComposer wordComposer,
- ArrayList<CharSequence> suggestions, int correctionMode, int[] sortedScores,
- CharSequence typedWord, double autoCorrectionThreshold) {
- if (wordComposer.size() > 1 && (correctionMode == Suggest.CORRECTION_FULL
- || correctionMode == Suggest.CORRECTION_FULL_BIGRAM)
- && typedWord != null && suggestions.size() > 0 && sortedScores.length > 0) {
+ ArrayList<CharSequence> suggestions, int[] sortedScores,
+ CharSequence consideredWord, double autoCorrectionThreshold) {
+ if (wordComposer.size() > 1 && suggestions.size() > 0 && sortedScores.length > 0) {
final CharSequence autoCorrectionSuggestion = suggestions.get(0);
final int autoCorrectionSuggestionScore = sortedScores[0];
// TODO: when the normalized score of the first suggestion is nearly equals to
// the normalized score of the second suggestion, behave less aggressive.
final double normalizedScore = BinaryDictionary.calcNormalizedScore(
- typedWord.toString(), autoCorrectionSuggestion.toString(),
+ consideredWord.toString(), autoCorrectionSuggestion.toString(),
autoCorrectionSuggestionScore);
if (DBG) {
- Log.d(TAG, "Normalized " + typedWord + "," + autoCorrectionSuggestion + ","
+ Log.d(TAG, "Normalized " + consideredWord + "," + autoCorrectionSuggestion + ","
+ autoCorrectionSuggestionScore + ", " + normalizedScore
+ "(" + autoCorrectionThreshold + ")");
}
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index e1ca854b5..13ba44be0 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -1816,20 +1816,20 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
} else {
prevWord = EditingUtils.getPreviousWord(ic, mSettingsValues.mWordSeparators);
}
+
+ final CharSequence typedWord = mWordComposer.getTypedWord();
+ final int quotesCount = mWordComposer.trailingSingleQuotesCount();
// getSuggestedWordBuilder handles gracefully a null value of prevWord
final SuggestedWords.Builder builder = mSuggest.getSuggestedWordBuilder(mWordComposer,
prevWord, mKeyboardSwitcher.getKeyboard().getProximityInfo(), mCorrectionMode);
- boolean autoCorrectionAvailable = !mInputAttributes.mInputTypeNoAutoCorrect
- && mSuggest.hasAutoCorrection();
- final CharSequence typedWord = mWordComposer.getTypedWord();
+ boolean autoCorrectionAvailable = mSuggest.hasAutoCorrection();
// Here, we want to promote a whitelisted word if exists.
// TODO: Change this scheme - a boolean is not enough. A whitelisted word may be "valid"
// but still autocorrected from - in the case the whitelist only capitalizes the word.
// The whitelist should be case-insensitive, so it's not possible to be consistent with
// a boolean flag. Right now this is handled with a slight hack in
// WhitelistDictionary#shouldForciblyAutoCorrectFrom.
- final int quotesCount = mWordComposer.trailingSingleQuotesCount();
final boolean allowsToBeAutoCorrected = AutoCorrection.allowsToBeAutoCorrected(
mSuggest.getUnigramDictionaries(),
// If the typed string ends with a single quote, for dictionary lookup purposes
diff --git a/java/src/com/android/inputmethod/latin/Suggest.java b/java/src/com/android/inputmethod/latin/Suggest.java
index a2131605d..b6a7ce74a 100644
--- a/java/src/com/android/inputmethod/latin/Suggest.java
+++ b/java/src/com/android/inputmethod/latin/Suggest.java
@@ -277,11 +277,9 @@ public class Suggest implements Dictionary.WordCallback {
final String consideredWord = mTrailingSingleQuotesCount > 0
? typedWord.substring(0, typedWord.length() - mTrailingSingleQuotesCount)
: typedWord;
- if (typedWord != null) {
- // Treating USER_TYPED as UNIGRAM suggestion for logging now.
- LatinImeLogger.onAddSuggestedWord(typedWord, Suggest.DIC_USER_TYPED,
- Dictionary.UNIGRAM);
- }
+ // Treating USER_TYPED as UNIGRAM suggestion for logging now.
+ LatinImeLogger.onAddSuggestedWord(typedWord, Suggest.DIC_USER_TYPED,
+ Dictionary.UNIGRAM);
mConsideredWord = consideredWord;
if (wordComposer.size() <= 1 && (correctionMode == CORRECTION_FULL_BIGRAM)) {
@@ -340,17 +338,21 @@ public class Suggest implements Dictionary.WordCallback {
}
}
}
- final String consideredWordString =
- consideredWord == null ? null : consideredWord.toString();
+ final String consideredWordString = consideredWord.toString();
CharSequence whitelistedWord = capitalizeWord(mIsAllUpperCase, mIsFirstCharCapitalized,
mWhiteListDictionary.getWhitelistedWord(consideredWordString));
- final CharSequence autoCorrection =
- AutoCorrection.computeAutoCorrectionWord(mUnigramDictionaries, wordComposer,
- mSuggestions, mScores, consideredWord, mAutoCorrectionThreshold, correctionMode,
- whitelistedWord);
- mHasAutoCorrection = (null != autoCorrection);
+ if (CORRECTION_FULL == correctionMode
+ || CORRECTION_FULL_BIGRAM == correctionMode) {
+ final CharSequence autoCorrection =
+ AutoCorrection.computeAutoCorrectionWord(mUnigramDictionaries, wordComposer,
+ mSuggestions, mScores, consideredWord, mAutoCorrectionThreshold,
+ whitelistedWord);
+ mHasAutoCorrection = (null != autoCorrection);
+ } else {
+ mHasAutoCorrection = false;
+ }
if (whitelistedWord != null) {
if (mTrailingSingleQuotesCount > 0) {
@@ -364,9 +366,7 @@ public class Suggest implements Dictionary.WordCallback {
}
}
- if (typedWord != null) {
- mSuggestions.add(0, typedWord.toString());
- }
+ mSuggestions.add(0, typedWord.toString());
StringUtils.removeDupes(mSuggestions);
if (DBG) {