Add popupKeyboardTemplate attribute to Keyboard

This change
- introduces the popupKeyboardTemplate attribute of Keyboard to
  specify XML Keyboard file for popup mini keyboard.
- introduces the maxPopupKeyboardColumn attribute of Keyboard to
  specify the maximum column of popup mini keyboard.
- changes the content format of the popupCharacters attribute of Key.
  It now represents keyLabel, codes and keyTextOutput of each key of
  popup mini keyboard using CSV format.

Bug: 2214959
Change-Id: I539e310f7e38a049ee193de0b4ad5d7afdce37b1
main
Tadashi G. Takaoka 2010-12-14 15:31:47 +09:00
parent f61287ae48
commit 9b6d1d52d9
104 changed files with 1201 additions and 1698 deletions

View File

@ -18,17 +18,16 @@
*/ */
--> -->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="alternates_for_a">áàâãäåæ</string> <string name="alternates_for_a">á,à,â,ã,ä,å,æ</string>
<string name="alternates_for_e">3éěèêë</string> <string name="alternates_for_e">3,é,ě,è,ê,ë</string>
<string name="alternates_for_i">íìîï8</string> <string name="alternates_for_i">í,ì,î,ï,8</string>
<string name="alternates_for_o">óòôõöœø9</string> <string name="alternates_for_o">ó,ò,ô,õ,ö,œ,ø,9</string>
<string name="alternates_for_u">ůúùûü7</string> <string name="alternates_for_u">ů,ú,ù,û,ü,7</string>
<string name="alternates_for_s">š§ß</string> <string name="alternates_for_s">š,§,ß</string>
<string name="alternates_for_n">ňñ</string> <string name="alternates_for_n">ň,ñ</string>
<string name="alternates_for_c">čç</string> <string name="alternates_for_c">č,ç</string>
<string name="alternates_for_y">ýÿ6</string>
<string name="alternates_for_d">ď</string> <string name="alternates_for_d">ď</string>
<string name="alternates_for_r">ř4</string> <string name="alternates_for_r">ř,4</string>
<string name="alternates_for_t">ť5</string> <string name="alternates_for_t">ť,5</string>
<string name="alternates_for_z">ž</string> <string name="alternates_for_z">ž</string>
</resources> </resources>

View File

@ -18,23 +18,23 @@
*/ */
--> -->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="alternates_for_a">áàâąã</string> <string name="alternates_for_a">á,à,â,ą,ã</string>
<string name="alternates_for_e">3éèêëę€</string> <string name="alternates_for_e">3,é,è,ê,ë,ę,</string>
<string name="alternates_for_i">íìîï8</string> <string name="alternates_for_i">í,ì,î,ï,8</string>
<string name="alternates_for_o">óòôõ9</string> <string name="alternates_for_o">ó,ò,ô,õ,9</string>
<string name="alternates_for_u">úùûū7</string> <string name="alternates_for_u">ú,ù,û,ū,7</string>
<string name="alternates_for_s">śšşß</string> <string name="alternates_for_s">ś,š,ş,ß</string>
<string name="alternates_for_n">ńñň</string> <string name="alternates_for_n">ń,ñ,ň</string>
<string name="alternates_for_c">çćč</string> <string name="alternates_for_c">ç,ć,č</string>
<string name="alternates_for_y">ýÿü6</string> <string name="alternates_for_y">ý,ÿ,ü,6</string>
<string name="alternates_for_d">ðď</string> <string name="alternates_for_d">ð,ď</string>
<string name="alternates_for_r">ř4</string> <string name="alternates_for_r">ř,4</string>
<string name="alternates_for_t">ťþ5</string> <string name="alternates_for_t">ť,þ,5</string>
<string name="alternates_for_z">źžż</string> <string name="alternates_for_z">ź,ž,ż</string>
<string name="alternates_for_l">ł</string> <string name="alternates_for_l">ł</string>
<string name="alternates_for_v">w</string> <string name="alternates_for_v">w</string>
<string name="keylabel_for_scandinavia_row2_10">æ</string> <string name="keylabel_for_scandinavia_row2_10">æ</string>
<string name="keylabel_for_scandinavia_row2_11">ø</string> <string name="keylabel_for_scandinavia_row2_11">ø</string>
<string name="alternates_for_scandinavia_row2_10">ä</string> <string name="alternates_for_scandinavia_row2_10">ä</string>
<string name="alternates_for_scandinavia_row2_11">öœ</string> <string name="alternates_for_scandinavia_row2_11">ö,œ</string>
</resources> </resources>

View File

@ -19,13 +19,7 @@
--> -->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="alternates_for_a">ä</string> <string name="alternates_for_a">ä</string>
<string name="alternates_for_e">3èéêë</string> <string name="alternates_for_o">ö,9</string>
<string name="alternates_for_i">ìíîï8</string> <string name="alternates_for_y">ý,ÿ</string>
<string name="alternates_for_o">ö9</string>
<string name="alternates_for_u">ùúûü7</string>
<string name="alternates_for_s">§ß</string>
<string name="alternates_for_n">ñ</string>
<string name="alternates_for_c">ç</string>
<string name="alternates_for_y">ýÿ</string>
<string name="alternates_for_z">6</string> <string name="alternates_for_z">6</string>
</resources> </resources>

View File

@ -1,30 +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.
*/
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="alternates_for_a">àáâãäåæ</string>
<string name="alternates_for_e">3èéêë</string>
<string name="alternates_for_i">ìíîï8</string>
<string name="alternates_for_o">òóôõöœø9</string>
<string name="alternates_for_u">ùúûü7</string>
<string name="alternates_for_s">§ß</string>
<string name="alternates_for_n">ñ</string>
<string name="alternates_for_c">ç</string>
<string name="alternates_for_y">ýÿ6</string>
</resources>

View File

@ -18,10 +18,9 @@
*/ */
--> -->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="alternates_for_a">àáâãäåāæ</string> <string name="alternates_for_a">à,á,â,ã,ä,å,ā,æ</string>
<string name="alternates_for_e">3èéêëē</string> <string name="alternates_for_e">3,è,é,ê,ë,ē</string>
<string name="alternates_for_i">ìíîïī8</string> <string name="alternates_for_i">ì,í,î,ï,ī,8</string>
<string name="alternates_for_o">òóôõöōœø9</string> <string name="alternates_for_o">ò,ó,ô,õ,ö,ō,œ,ø,9</string>
<string name="alternates_for_u">ùúûüū7</string> <string name="alternates_for_u">ù,ú,û,ü,ū,7</string>
<string name="alternates_for_y">ýÿ6</string>
</resources> </resources>

View File

@ -1,30 +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.
*/
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="alternates_for_a">àáâãäåæ</string>
<string name="alternates_for_e">3èéêë</string>
<string name="alternates_for_i">ìíîï8</string>
<string name="alternates_for_o">òóôõöœø9</string>
<string name="alternates_for_u">ùúûü7</string>
<string name="alternates_for_s">§ß</string>
<string name="alternates_for_n">ñ</string>
<string name="alternates_for_c">ç</string>
<string name="alternates_for_y">ýÿ6</string>
</resources>

View File

@ -19,12 +19,6 @@
--> -->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="alternates_for_a">á</string> <string name="alternates_for_a">á</string>
<string name="alternates_for_e"></string> <string name="alternates_for_e">3,é</string>
<string name="alternates_for_i">ìíîï8</string> <string name="alternates_for_o">ó,9</string>
<string name="alternates_for_o">ó9</string>
<string name="alternates_for_u">ùúûü7</string>
<string name="alternates_for_s">§ß</string>
<string name="alternates_for_n">ñ</string>
<string name="alternates_for_c">ç</string>
<string name="alternates_for_y">ýÿ6</string>
</resources> </resources>

View File

@ -18,15 +18,7 @@
*/ */
--> -->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="alternates_for_a">1àáâãäåæ</string> <string name="alternates_for_a">1,à,á,â,ã,ä,å,æ</string>
<string name="alternates_for_e">3èéêë</string>
<string name="alternates_for_i">ìíîï8</string>
<string name="alternates_for_o">òóôõöœø9</string>
<string name="alternates_for_u">ùúûü7</string>
<string name="alternates_for_s">§ß</string>
<string name="alternates_for_n">ñ</string>
<string name="alternates_for_c">ç</string>
<string name="alternates_for_y">ýÿ6</string>
<string name="alternates_for_q"></string> <string name="alternates_for_q"></string>
<string name="alternates_for_w"></string> <string name="alternates_for_w"></string>
<string name="alternates_for_z">2</string> <string name="alternates_for_z">2</string>

View File

@ -18,13 +18,8 @@
*/ */
--> -->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="alternates_for_a">àá</string> <string name="alternates_for_a">à,á</string>
<string name="alternates_for_e">3èé</string> <string name="alternates_for_e">3,è,é</string>
<string name="alternates_for_i">ìíîï8</string> <string name="alternates_for_o">ò,ó,9</string>
<string name="alternates_for_o">òó9</string>
<string name="alternates_for_u">ùúûü7</string>
<string name="alternates_for_s">§</string> <string name="alternates_for_s">§</string>
<string name="alternates_for_n">ñ</string>
<string name="alternates_for_c">ç</string>
<string name="alternates_for_y">ýÿ6</string>
</resources> </resources>

View File

@ -1,30 +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.
*/
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="alternates_for_a">àáâãäåæ</string>
<string name="alternates_for_e">3èéêë</string>
<string name="alternates_for_i">ìíîï8</string>
<string name="alternates_for_o">òóôõöœø9</string>
<string name="alternates_for_u">ùúûü7</string>
<string name="alternates_for_s">§ß</string>
<string name="alternates_for_n">ñ</string>
<string name="alternates_for_c">ç</string>
<string name="alternates_for_y">ýÿ6</string>
</resources>

View File

@ -1,30 +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.
*/
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="alternates_for_a">àáâãäåæ</string>
<string name="alternates_for_e">3èéêë</string>
<string name="alternates_for_i">ìíîï8</string>
<string name="alternates_for_o">òóôõöœø9</string>
<string name="alternates_for_u">ùúûü7</string>
<string name="alternates_for_s">§ß</string>
<string name="alternates_for_n">ñ</string>
<string name="alternates_for_c">ç</string>
<string name="alternates_for_y">ýÿ6</string>
</resources>

View File

@ -18,19 +18,18 @@
*/ */
--> -->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="alternates_for_a">äáàâąã</string> <string name="alternates_for_a">ä,á,à,â,ą,ã</string>
<string name="alternates_for_e">3éèêëę€</string> <string name="alternates_for_e">3,é,è,ê,ë,ę,€</string>
<string name="alternates_for_i">íìîï8</string> <string name="alternates_for_i">í,ì,î,ï,8</string>
<string name="alternates_for_o">öóòôõ9</string> <string name="alternates_for_o">ö,ó,ò,ô,õ,9</string>
<string name="alternates_for_u">üúùûū7</string> <string name="alternates_for_u">ü,ú,ù,û,ū,7</string>
<string name="alternates_for_s">śšşß</string> <string name="alternates_for_s">ś,š,ş,ß</string>
<string name="alternates_for_n">ńñň</string> <string name="alternates_for_n">ń,ñ,ň</string>
<string name="alternates_for_c">çćč</string> <string name="alternates_for_c">ç,ć,č</string>
<string name="alternates_for_y">ýÿ6</string> <string name="alternates_for_d">ð,ď</string>
<string name="alternates_for_d">ðď</string> <string name="alternates_for_r">ř,4</string>
<string name="alternates_for_r">ř4</string> <string name="alternates_for_t">ť,þ,5</string>
<string name="alternates_for_t">ťþ5</string> <string name="alternates_for_z">ź,ž,ż</string>
<string name="alternates_for_z">źžż</string>
<string name="alternates_for_l">ł</string> <string name="alternates_for_l">ł</string>
<string name="alternates_for_v">w</string> <string name="alternates_for_v">w</string>
<string name="keylabel_for_scandinavia_row2_10">ø</string> <string name="keylabel_for_scandinavia_row2_10">ø</string>

View File

@ -1,30 +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.
*/
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="alternates_for_a">àáâãäåæ</string>
<string name="alternates_for_e">3èéêë</string>
<string name="alternates_for_i">ìíîï8</string>
<string name="alternates_for_o">òóôõöœø9</string>
<string name="alternates_for_u">ùúûü7</string>
<string name="alternates_for_s">§ß</string>
<string name="alternates_for_n">ñ</string>
<string name="alternates_for_c">ç</string>
<string name="alternates_for_y">ýÿ6</string>
</resources>

View File

@ -19,14 +19,11 @@
--> -->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="alternates_for_a">ą</string> <string name="alternates_for_a">ą</string>
<string name="alternates_for_e">ę3</string> <string name="alternates_for_e">ę,3</string>
<string name="alternates_for_i">ìíîï8</string> <string name="alternates_for_o">ó,9</string>
<string name="alternates_for_o">ó9</string>
<string name="alternates_for_u">ùúûü7</string>
<string name="alternates_for_s">ś</string> <string name="alternates_for_s">ś</string>
<string name="alternates_for_n">ń</string> <string name="alternates_for_n">ń</string>
<string name="alternates_for_c">ć</string> <string name="alternates_for_c">ć</string>
<string name="alternates_for_y">ýÿ6</string> <string name="alternates_for_z">ź,ż</string>
<string name="alternates_for_z">źż</string>
<string name="alternates_for_l">ł</string> <string name="alternates_for_l">ł</string>
</resources> </resources>

View File

@ -1,30 +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.
*/
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="alternates_for_a">àáâãäåæ</string>
<string name="alternates_for_e">3èéêë</string>
<string name="alternates_for_i">ìíîï8</string>
<string name="alternates_for_o">òóôõöœø9</string>
<string name="alternates_for_u">ùúûü7</string>
<string name="alternates_for_s">§ß</string>
<string name="alternates_for_n">ñ</string>
<string name="alternates_for_c">ç</string>
<string name="alternates_for_y">ýÿ6</string>
</resources>

View File

@ -1,30 +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.
*/
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="alternates_for_a">àáâãäåæ</string>
<string name="alternates_for_e">3èéêë</string>
<string name="alternates_for_i">ìíîï8</string>
<string name="alternates_for_o">òóôõöœø9</string>
<string name="alternates_for_u">ùúûü7</string>
<string name="alternates_for_s">§ß</string>
<string name="alternates_for_n">ñ</string>
<string name="alternates_for_c">ç</string>
<string name="alternates_for_y">ýÿ6</string>
</resources>

View File

@ -18,13 +18,5 @@
*/ */
--> -->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="alternates_for_a">àáâãäåæ</string> <string name="alternates_for_o">ò,ó,ö,ô,õ,œ,ø,9</string>
<string name="alternates_for_e">3èéêë</string>
<string name="alternates_for_i">ìíîï8</string>
<string name="alternates_for_o">òóöôõœø9</string>
<string name="alternates_for_u">ùúûü7</string>
<string name="alternates_for_s">§ß</string>
<string name="alternates_for_n">ñ</string>
<string name="alternates_for_c">ç</string>
<string name="alternates_for_y">ýÿ6</string>
</resources> </resources>

View File

@ -18,15 +18,6 @@
*/ */
--> -->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="alternates_for_a">àáâãäåæ</string>
<string name="alternates_for_e">èéêë</string>
<string name="alternates_for_i">ìíîï</string>
<string name="alternates_for_o">òóôõöœø</string>
<string name="alternates_for_u">ùúûü</string>
<string name="alternates_for_s">§ß</string>
<string name="alternates_for_n">ñ</string>
<string name="alternates_for_c">ç</string>
<string name="alternates_for_y">ýÿ</string>
<string name="alternates_for_cyrillic_e">ё5</string> <string name="alternates_for_cyrillic_e">ё5</string>
<string name="alternates_for_cyrillic_soft_sign">ъ</string> <string name="alternates_for_cyrillic_soft_sign">ъ</string>
</resources> </resources>

View File

@ -18,23 +18,23 @@
*/ */
--> -->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="alternates_for_a">áàâąã</string> <string name="alternates_for_a">á,à,â,ą,ã</string>
<string name="alternates_for_e">3éèêëę€</string> <string name="alternates_for_e">3,é,è,ê,ë,ę,</string>
<string name="alternates_for_i">íìîï8</string> <string name="alternates_for_i">í,ì,î,ï,8</string>
<string name="alternates_for_o">óòôõ9</string> <string name="alternates_for_o">ó,ò,ô,õ,9</string>
<string name="alternates_for_u">úùûū7</string> <string name="alternates_for_u">ú,ù,û,ū,7</string>
<string name="alternates_for_s">śšşß</string> <string name="alternates_for_s">ś,š,ş,ß</string>
<string name="alternates_for_n">ńñň</string> <string name="alternates_for_n">ń,ñ,ň</string>
<string name="alternates_for_c">çćč</string> <string name="alternates_for_c">ç,ć,č</string>
<string name="alternates_for_y">ýÿü6</string> <string name="alternates_for_y">ý,ÿ,ü,6</string>
<string name="alternates_for_d">ðď</string> <string name="alternates_for_d">ð,ď</string>
<string name="alternates_for_r">ř4</string> <string name="alternates_for_r">ř,4</string>
<string name="alternates_for_t">ťþ5</string> <string name="alternates_for_t">ť,þ,5</string>
<string name="alternates_for_z">źžż</string> <string name="alternates_for_z">ź,ž,ż</string>
<string name="alternates_for_l">ł</string> <string name="alternates_for_l">ł</string>
<string name="alternates_for_v">w</string> <string name="alternates_for_v">w</string>
<string name="keylabel_for_scandinavia_row2_10">ö</string> <string name="keylabel_for_scandinavia_row2_10">ö</string>
<string name="keylabel_for_scandinavia_row2_11">ä</string> <string name="keylabel_for_scandinavia_row2_11">ä</string>
<string name="alternates_for_scandinavia_row2_10">øœ</string> <string name="alternates_for_scandinavia_row2_10">ø,œ</string>
<string name="alternates_for_scandinavia_row2_11">æ</string> <string name="alternates_for_scandinavia_row2_11">æ</string>
</resources> </resources>

View File

@ -18,14 +18,8 @@
*/ */
--> -->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="alternates_for_a">àáâãäåæ</string> <string name="alternates_for_o">ö,ò,ó,ô,õ,œ,ø,9</string>
<string name="alternates_for_e">3èéêë</string> <string name="alternates_for_u">ü,ù,ú,û,7</string>
<string name="alternates_for_i">ìíîï8</string> <string name="alternates_for_s">ş,§,ß</string>
<string name="alternates_for_o">öòóôõœø9</string>
<string name="alternates_for_u">üùúû7</string>
<string name="alternates_for_s">ş§ß</string>
<string name="alternates_for_n">ñ</string>
<string name="alternates_for_c">ç</string>
<string name="alternates_for_y">ýÿ6</string>
<string name="alternates_for_g">ğ</string> <string name="alternates_for_g">ğ</string>
</resources> </resources>

View File

@ -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.
*/
-->
<resources>
<!-- Whether or not Popup on key press is enabled by default -->
<bool name="default_popup_preview">false</bool>
<bool name="config_enable_show_settings_key_option">false</bool>
<bool name="config_enable_show_subtype_settings">false</bool>
<bool name="config_enable_show_voice_key_option">false</bool>
<bool name="config_candidate_highlight_font_color_enabled">false</bool>
</resources>

View File

@ -19,5 +19,12 @@
--> -->
<resources> <resources>
<bool name="config_enable_show_settings_key_option">false</bool>
<bool name="config_enable_show_subtype_settings">false</bool>
<bool name="config_enable_show_voice_key_option">false</bool>
<bool name="config_candidate_highlight_font_color_enabled">false</bool>
<!-- Whether or not Popup on key press is enabled by default -->
<bool name="config_default_popup_preview">false</bool>
<string name="config_text_size_of_language_on_spacebar">medium</string> <string name="config_text_size_of_language_on_spacebar">medium</string>
<integer name="config_max_popup_keyboard_column">9</integer>
</resources> </resources>

View File

@ -1,30 +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.
*/
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="alternates_for_a">àáâãäåæ</string>
<string name="alternates_for_e">èéêë</string>
<string name="alternates_for_i">ìíîï</string>
<string name="alternates_for_o">òóôõöœø</string>
<string name="alternates_for_u">ùúûü</string>
<string name="alternates_for_s">§ß</string>
<string name="alternates_for_n">ñ</string>
<string name="alternates_for_c">ç</string>
<string name="alternates_for_y">ýÿ</string>
</resources>

View File

@ -1,30 +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.
*/
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="alternates_for_a">àáâãäåæ</string>
<string name="alternates_for_e">èéêë</string>
<string name="alternates_for_i">ìíîï</string>
<string name="alternates_for_o">òóôõöœø</string>
<string name="alternates_for_u">ùúûü</string>
<string name="alternates_for_s">§ß</string>
<string name="alternates_for_n">ñ</string>
<string name="alternates_for_c">ç</string>
<string name="alternates_for_y">ýÿ</string>
</resources>

View File

@ -89,15 +89,17 @@
<attr name="horizontalGap" format="dimension|fraction" /> <attr name="horizontalGap" format="dimension|fraction" />
<!-- Default vertical gap between rows of keys. --> <!-- Default vertical gap between rows of keys. -->
<attr name="verticalGap" format="dimension|fraction" /> <attr name="verticalGap" format="dimension|fraction" />
<!-- Popup keyboard layout template -->
<attr name="popupKeyboardTemplate" format="reference" />
</declare-styleable> </declare-styleable>
<declare-styleable name="Keyboard_Key"> <declare-styleable name="Keyboard_Key">
<!-- The unicode value or comma-separated values that this key outputs. --> <!-- The unicode value or comma-separated values that this key outputs. -->
<attr name="codes" format="integer|string" /> <attr name="codes" format="integer|string" />
<!-- The XML keyboard layout of any popup keyboard. -->
<attr name="popupKeyboard" format="reference" />
<!-- The characters to display in the popup keyboard. --> <!-- The characters to display in the popup keyboard. -->
<attr name="popupCharacters" format="string" /> <attr name="popupCharacters" format="string" />
<!-- Maximum column of popup keyboard -->
<attr name="maxPopupKeyboardColumn" format="integer" />
<!-- Key edge flags. --> <!-- Key edge flags. -->
<attr name="keyEdgeFlags"> <attr name="keyEdgeFlags">
<!-- Key is anchored to the left of the keyboard. --> <!-- Key is anchored to the left of the keyboard. -->

View File

@ -18,20 +18,9 @@
*/ */
--> -->
<resources> <resources>
<!-- Whether or not auto-correction should be enabled by default -->
<bool name="enable_autocorrect">true</bool>
<!-- Whether this input method should be used as the default for a locale. Override it <!-- Whether this input method should be used as the default for a locale. Override it
for latin languages. --> for latin languages. -->
<bool name="im_is_default">false</bool> <bool name="im_is_default">false</bool>
<!-- Whether or not voice input is enabled by default. --> <!-- Whether or not voice input is enabled by default. -->
<bool name="voice_input_default">true</bool> <bool name="voice_input_default">true</bool>
<bool name="config_swipeDisambiguation">true</bool>
<!-- Whether or not Popup on key press is enabled by default -->
<bool name="default_popup_preview">true</bool>
<bool name="default_recorrection_enabled">true</bool>
<bool name="config_long_press_comma_for_settings_enabled">true</bool>
<bool name="config_enable_show_settings_key_option">true</bool>
<bool name="config_enable_show_subtype_settings">true</bool>
<bool name="config_enable_show_voice_key_option">true</bool>
<bool name="config_candidate_highlight_font_color_enabled">true</bool>
</resources> </resources>

View File

@ -19,6 +19,15 @@
--> -->
<resources> <resources>
<bool name="config_swipeDisambiguation">true</bool>
<bool name="default_recorrection_enabled">true</bool>
<bool name="config_long_press_comma_for_settings_enabled">true</bool>
<bool name="config_enable_show_settings_key_option">true</bool>
<bool name="config_enable_show_subtype_settings">true</bool>
<bool name="config_enable_show_voice_key_option">true</bool>
<bool name="config_candidate_highlight_font_color_enabled">true</bool>
<!-- Whether or not Popup on key press is enabled by default -->
<bool name="config_default_popup_preview">true</bool>
<integer name="config_delay_before_preview">0</integer> <integer name="config_delay_before_preview">0</integer>
<integer name="config_delay_after_preview">10</integer> <integer name="config_delay_after_preview">10</integer>
<integer name="config_preview_fadein_anim_time">0</integer> <integer name="config_preview_fadein_anim_time">0</integer>
@ -33,6 +42,9 @@
<integer name="config_long_press_shift_key_timeout">1200</integer> <integer name="config_long_press_shift_key_timeout">1200</integer>
<integer name="config_multi_tap_key_timeout">800</integer> <integer name="config_multi_tap_key_timeout">800</integer>
<string name="config_text_size_of_language_on_spacebar">small</string> <string name="config_text_size_of_language_on_spacebar">small</string>
<integer name="config_max_popup_keyboard_column">9</integer>
<!-- Whether or not auto-correction should be enabled by default -->
<bool name="enable_autocorrect">true</bool>
<string-array name="auto_correction_threshold_values"> <string-array name="auto_correction_threshold_values">
<!-- Off, When auto correction setting is Off, this value is not used. --> <!-- Off, When auto correction setting is Off, this value is not used. -->
<item></item> <item></item>

View File

@ -18,15 +18,15 @@
*/ */
--> -->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="alternates_for_a">àáâãäåæ</string> <string name="alternates_for_a">à,á,â,ã,ä,å,æ</string>
<string name="alternates_for_e">èéêë</string> <string name="alternates_for_e">3,è,é,ê,ë</string>
<string name="alternates_for_i">ìíîï</string> <string name="alternates_for_i">ì,í,î,ï,8</string>
<string name="alternates_for_o">òóôõöœø</string> <string name="alternates_for_o">ò,ó,ô,õ,ö,œ,ø,9</string>
<string name="alternates_for_u">ùúûü</string> <string name="alternates_for_u">ù,ú,û,ü,7</string>
<string name="alternates_for_s">§ß</string> <string name="alternates_for_s">§,ß</string>
<string name="alternates_for_n">ñ</string> <string name="alternates_for_n">ñ</string>
<string name="alternates_for_c">ç</string> <string name="alternates_for_c">ç</string>
<string name="alternates_for_y">ýÿ</string> <string name="alternates_for_y">ý,ÿ,6</string>
<string name="alternates_for_q">1</string> <string name="alternates_for_q">1</string>
<string name="alternates_for_w">2</string> <string name="alternates_for_w">2</string>
<string name="alternates_for_d"></string> <string name="alternates_for_d"></string>
@ -43,14 +43,13 @@
<string name="alternates_for_scandinavia_row2_11"></string> <string name="alternates_for_scandinavia_row2_11"></string>
<string name="alternates_for_cyrillic_e"></string> <string name="alternates_for_cyrillic_e"></string>
<string name="alternates_for_cyrillic_soft_sign"></string> <string name="alternates_for_cyrillic_soft_sign"></string>
<string name="alternates_for_mic">"\@drawable/sym_keyboard_settings|\@integer/key_settings,\@drawable/sym_keyboard_mic|\@integer/key_voice"</string>
<string name="alternates_for_smiley">":-)|:-) ,:-(|:-( ,;-)|;-) ,:-P|:-P ,=-O|=-O ,:-*|:-* ,:O|:O ,B-)|B-) ,:-$|:-$ ,:-!|:-! ,:-[|:-[ ,O:-)|O:-) ,:-\\\\\\\\|:-\\\\\\\\ ,:\'(|:\'( ,:-D|:-D "</string>
<string name="alternates_for_settings_slash">"\@drawable/sym_keyboard_settings|\@integer/key_settings,/"</string>
<string name="alternates_for_settings_at">"\@drawable/sym_keyboard_settings|\@integer/key_settings,\@"</string>
<string name="alternates_for_settings_comma">"\@drawable/sym_keyboard_settings|\@integer/key_settings,\\,"</string>
<string name="alternates_for_punctuation">":,/,&amp;,(,),-,+,;,\@,\',\",\?,!,\\,"</string>
<string name="keylabel_for_popular_domain">".com"</string>
<!-- popular web domains for the locale - most popular, displayed on the keyboard --> <!-- popular web domains for the locale - most popular, displayed on the keyboard -->
<string name="popular_domain_0">".com"</string> <string name="alternates_for_popular_domain">".net,.org,.gov,.edu"</string>
<!-- popular web domains for the locale - item 1, displayed in the popup -->
<string name="popular_domain_1">".net"</string>
<!-- popular web domains for the locale - item 2, displayed in the popup -->
<string name="popular_domain_2">".org"</string>
<!-- popular web domains for the locale - item 3, displayed in the popup -->
<string name="popular_domain_3">".gov"</string>
<!-- popular web domains for the locale - item 4, displayed in the popup -->
<string name="popular_domain_4">".edu"</string>
</resources> </resources>

View File

@ -31,6 +31,8 @@
latin:rowHeight="25%p" latin:rowHeight="25%p"
latin:horizontalGap="@dimen/key_horizontal_gap" latin:horizontalGap="@dimen/key_horizontal_gap"
latin:verticalGap="@dimen/key_bottom_gap" latin:verticalGap="@dimen/key_bottom_gap"
latin:popupKeyboardTemplate="@xml/kbd_popup_template"
latin:maxPopupKeyboardColumn="@integer/config_max_popup_keyboard_column"
> >
<include <include
latin:keyboardLayout="@xml/kbd_qwerty_rows_scandinavia" /> latin:keyboardLayout="@xml/kbd_qwerty_rows_scandinavia" />

View File

@ -32,6 +32,8 @@
latin:keyWidth="9.09%p" latin:keyWidth="9.09%p"
latin:horizontalGap="@dimen/key_horizontal_gap" latin:horizontalGap="@dimen/key_horizontal_gap"
latin:verticalGap="@dimen/key_bottom_gap" latin:verticalGap="@dimen/key_bottom_gap"
latin:popupKeyboardTemplate="@xml/kbd_popup_template"
latin:maxPopupKeyboardColumn="@integer/config_max_popup_keyboard_column"
> >
<include <include
latin:keyboardLayout="@xml/kbd_qwerty_rows_scandinavia" /> latin:keyboardLayout="@xml/kbd_qwerty_rows_scandinavia" />

View File

@ -26,6 +26,8 @@
latin:keyWidth="10%p" latin:keyWidth="10%p"
latin:horizontalGap="@dimen/key_horizontal_gap" latin:horizontalGap="@dimen/key_horizontal_gap"
latin:verticalGap="@dimen/key_bottom_gap" latin:verticalGap="@dimen/key_bottom_gap"
latin:popupKeyboardTemplate="@xml/kbd_popup_template"
latin:maxPopupKeyboardColumn="@integer/config_max_popup_keyboard_column"
> >
<include <include
latin:keyboardLayout="@xml/kbd_qwertz_rows" /> latin:keyboardLayout="@xml/kbd_qwertz_rows" />

View File

@ -26,6 +26,8 @@
latin:keyWidth="10%p" latin:keyWidth="10%p"
latin:horizontalGap="@dimen/key_horizontal_gap" latin:horizontalGap="@dimen/key_horizontal_gap"
latin:verticalGap="@dimen/key_bottom_gap" latin:verticalGap="@dimen/key_bottom_gap"
latin:popupKeyboardTemplate="@xml/kbd_popup_template"
latin:maxPopupKeyboardColumn="@integer/config_max_popup_keyboard_column"
> >
<include <include
latin:keyboardLayout="@xml/kbd_qwertz_rows" /> latin:keyboardLayout="@xml/kbd_qwertz_rows" />

View File

@ -26,6 +26,8 @@
latin:keyWidth="10%p" latin:keyWidth="10%p"
latin:horizontalGap="@dimen/key_horizontal_gap" latin:horizontalGap="@dimen/key_horizontal_gap"
latin:verticalGap="@dimen/key_bottom_gap" latin:verticalGap="@dimen/key_bottom_gap"
latin:popupKeyboardTemplate="@xml/kbd_popup_template"
latin:maxPopupKeyboardColumn="@integer/config_max_popup_keyboard_column"
> >
<include <include
latin:keyboardLayout="@xml/kbd_qwerty_rows" /> latin:keyboardLayout="@xml/kbd_qwerty_rows" />

View File

@ -26,6 +26,8 @@
latin:keyWidth="10%p" latin:keyWidth="10%p"
latin:horizontalGap="@dimen/key_horizontal_gap" latin:horizontalGap="@dimen/key_horizontal_gap"
latin:verticalGap="@dimen/key_bottom_gap" latin:verticalGap="@dimen/key_bottom_gap"
latin:popupKeyboardTemplate="@xml/kbd_popup_template"
latin:maxPopupKeyboardColumn="@integer/config_max_popup_keyboard_column"
> >
<include <include
latin:keyboardLayout="@xml/kbd_qwerty_rows" /> latin:keyboardLayout="@xml/kbd_qwerty_rows" />

View File

@ -26,6 +26,8 @@
latin:keyWidth="10%p" latin:keyWidth="10%p"
latin:horizontalGap="@dimen/key_horizontal_gap" latin:horizontalGap="@dimen/key_horizontal_gap"
latin:verticalGap="@dimen/key_bottom_gap" latin:verticalGap="@dimen/key_bottom_gap"
latin:popupKeyboardTemplate="@xml/kbd_popup_template"
latin:maxPopupKeyboardColumn="@integer/config_max_popup_keyboard_column"
> >
<include <include
latin:keyboardLayout="@xml/kbd_qwertz_rows" /> latin:keyboardLayout="@xml/kbd_qwertz_rows" />

View File

@ -26,6 +26,8 @@
latin:keyWidth="10%p" latin:keyWidth="10%p"
latin:horizontalGap="@dimen/key_horizontal_gap" latin:horizontalGap="@dimen/key_horizontal_gap"
latin:verticalGap="@dimen/key_bottom_gap" latin:verticalGap="@dimen/key_bottom_gap"
latin:popupKeyboardTemplate="@xml/kbd_popup_template"
latin:maxPopupKeyboardColumn="@integer/config_max_popup_keyboard_column"
> >
<include <include
latin:keyboardLayout="@xml/kbd_qwertz_rows" /> latin:keyboardLayout="@xml/kbd_qwertz_rows" />

View File

@ -26,6 +26,8 @@
latin:keyWidth="10%p" latin:keyWidth="10%p"
latin:horizontalGap="@dimen/key_horizontal_gap" latin:horizontalGap="@dimen/key_horizontal_gap"
latin:verticalGap="@dimen/key_bottom_gap" latin:verticalGap="@dimen/key_bottom_gap"
latin:popupKeyboardTemplate="@xml/kbd_popup_template"
latin:maxPopupKeyboardColumn="@integer/config_max_popup_keyboard_column"
> >
<include <include
latin:keyboardLayout="@xml/kbd_azerty_rows" /> latin:keyboardLayout="@xml/kbd_azerty_rows" />

View File

@ -26,6 +26,8 @@
latin:keyWidth="10%p" latin:keyWidth="10%p"
latin:horizontalGap="@dimen/key_horizontal_gap" latin:horizontalGap="@dimen/key_horizontal_gap"
latin:verticalGap="@dimen/key_bottom_gap" latin:verticalGap="@dimen/key_bottom_gap"
latin:popupKeyboardTemplate="@xml/kbd_popup_template"
latin:maxPopupKeyboardColumn="@integer/config_max_popup_keyboard_column"
> >
<include <include
latin:keyboardLayout="@xml/kbd_azerty_rows" /> latin:keyboardLayout="@xml/kbd_azerty_rows" />

View File

@ -26,6 +26,8 @@
latin:keyWidth="10%p" latin:keyWidth="10%p"
latin:horizontalGap="@dimen/key_horizontal_gap" latin:horizontalGap="@dimen/key_horizontal_gap"
latin:verticalGap="@dimen/key_bottom_gap" latin:verticalGap="@dimen/key_bottom_gap"
latin:popupKeyboardTemplate="@xml/kbd_popup_template"
latin:maxPopupKeyboardColumn="@integer/config_max_popup_keyboard_column"
> >
<include <include
latin:keyboardLayout="@xml/kbd_key_styles" /> latin:keyboardLayout="@xml/kbd_key_styles" />

View File

@ -31,6 +31,8 @@
latin:rowHeight="25%p" latin:rowHeight="25%p"
latin:horizontalGap="@dimen/key_horizontal_gap" latin:horizontalGap="@dimen/key_horizontal_gap"
latin:verticalGap="@dimen/key_bottom_gap" latin:verticalGap="@dimen/key_bottom_gap"
latin:popupKeyboardTemplate="@xml/kbd_popup_template"
latin:maxPopupKeyboardColumn="@integer/config_max_popup_keyboard_column"
> >
<include <include
latin:keyboardLayout="@xml/kbd_qwerty_rows_scandinavia" /> latin:keyboardLayout="@xml/kbd_qwerty_rows_scandinavia" />

View File

@ -32,6 +32,8 @@
latin:keyWidth="9.09%p" latin:keyWidth="9.09%p"
latin:horizontalGap="@dimen/key_horizontal_gap" latin:horizontalGap="@dimen/key_horizontal_gap"
latin:verticalGap="@dimen/key_bottom_gap" latin:verticalGap="@dimen/key_bottom_gap"
latin:popupKeyboardTemplate="@xml/kbd_popup_template"
latin:maxPopupKeyboardColumn="@integer/config_max_popup_keyboard_column"
> >
<include <include
latin:keyboardLayout="@xml/kbd_qwerty_rows_scandinavia" /> latin:keyboardLayout="@xml/kbd_qwerty_rows_scandinavia" />

View File

@ -26,6 +26,8 @@
latin:keyWidth="9.091%p" latin:keyWidth="9.091%p"
latin:horizontalGap="@dimen/key_horizontal_gap" latin:horizontalGap="@dimen/key_horizontal_gap"
latin:verticalGap="@dimen/key_bottom_gap" latin:verticalGap="@dimen/key_bottom_gap"
latin:popupKeyboardTemplate="@xml/kbd_popup_template"
latin:maxPopupKeyboardColumn="@integer/config_max_popup_keyboard_column"
> >
<include <include
latin:keyboardLayout="@xml/kbd_key_styles" /> latin:keyboardLayout="@xml/kbd_key_styles" />
@ -40,43 +42,33 @@
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<Key <Key
latin:keyLabel="й" latin:keyLabel="й"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="1" /> latin:popupCharacters="1" />
<Key <Key
latin:keyLabel="ц" latin:keyLabel="ц"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="2" /> latin:popupCharacters="2" />
<Key <Key
latin:keyLabel="у" latin:keyLabel="у"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="3" /> latin:popupCharacters="3" />
<Key <Key
latin:keyLabel="к" latin:keyLabel="к"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="4" /> latin:popupCharacters="4" />
<Key <Key
latin:keyLabel="е" latin:keyLabel="е"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_cyrillic_e" /> latin:popupCharacters="@string/alternates_for_cyrillic_e" />
<Key <Key
latin:keyLabel="н" latin:keyLabel="н"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="6" /> latin:popupCharacters="6" />
<Key <Key
latin:keyLabel="г" latin:keyLabel="г"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="7" /> latin:popupCharacters="7" />
<Key <Key
latin:keyLabel="ш" latin:keyLabel="ш"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="8" /> latin:popupCharacters="8" />
<Key <Key
latin:keyLabel="щ" latin:keyLabel="щ"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="9" /> latin:popupCharacters="9" />
<Key <Key
latin:keyLabel="з" latin:keyLabel="з"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="0" /> latin:popupCharacters="0" />
<Key <Key
latin:keyLabel="х" /> latin:keyLabel="х" />
@ -141,7 +133,6 @@
latin:keyLabel="т" /> latin:keyLabel="т" />
<Key <Key
latin:keyLabel="ь" latin:keyLabel="ь"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_cyrillic_soft_sign" /> latin:popupCharacters="@string/alternates_for_cyrillic_soft_sign" />
<Key <Key
latin:keyLabel="б" /> latin:keyLabel="б" />

View File

@ -26,6 +26,8 @@
latin:keyWidth="9.091%p" latin:keyWidth="9.091%p"
latin:horizontalGap="@dimen/key_horizontal_gap" latin:horizontalGap="@dimen/key_horizontal_gap"
latin:verticalGap="@dimen/key_bottom_gap" latin:verticalGap="@dimen/key_bottom_gap"
latin:popupKeyboardTemplate="@xml/kbd_popup_template"
latin:maxPopupKeyboardColumn="@integer/config_max_popup_keyboard_column"
> >
<include <include
latin:keyboardLayout="@xml/kbd_key_styles" /> latin:keyboardLayout="@xml/kbd_key_styles" />
@ -35,54 +37,44 @@
<Key <Key
latin:keyLabel="й" latin:keyLabel="й"
latin:keyHintIcon="@drawable/keyboard_hint_1" latin:keyHintIcon="@drawable/keyboard_hint_1"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="1" latin:popupCharacters="1"
latin:keyWidth="8.75%p" latin:keyWidth="8.75%p"
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<Key <Key
latin:keyLabel="ц" latin:keyLabel="ц"
latin:keyHintIcon="@drawable/keyboard_hint_2" latin:keyHintIcon="@drawable/keyboard_hint_2"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="2" /> latin:popupCharacters="2" />
<Key <Key
latin:keyLabel="у" latin:keyLabel="у"
latin:keyHintIcon="@drawable/keyboard_hint_3" latin:keyHintIcon="@drawable/keyboard_hint_3"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="3" /> latin:popupCharacters="3" />
<Key <Key
latin:keyLabel="к" latin:keyLabel="к"
latin:keyHintIcon="@drawable/keyboard_hint_4" latin:keyHintIcon="@drawable/keyboard_hint_4"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="4" /> latin:popupCharacters="4" />
<Key <Key
latin:keyLabel="е" latin:keyLabel="е"
latin:keyHintIcon="@drawable/keyboard_hint_5" latin:keyHintIcon="@drawable/keyboard_hint_5"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_cyrillic_e" /> latin:popupCharacters="@string/alternates_for_cyrillic_e" />
<Key <Key
latin:keyLabel="н" latin:keyLabel="н"
latin:keyHintIcon="@drawable/keyboard_hint_6" latin:keyHintIcon="@drawable/keyboard_hint_6"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="6" /> latin:popupCharacters="6" />
<Key <Key
latin:keyLabel="г" latin:keyLabel="г"
latin:keyHintIcon="@drawable/keyboard_hint_7" latin:keyHintIcon="@drawable/keyboard_hint_7"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="7" /> latin:popupCharacters="7" />
<Key <Key
latin:keyLabel="ш" latin:keyLabel="ш"
latin:keyHintIcon="@drawable/keyboard_hint_8" latin:keyHintIcon="@drawable/keyboard_hint_8"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="8" /> latin:popupCharacters="8" />
<Key <Key
latin:keyLabel="щ" latin:keyLabel="щ"
latin:keyHintIcon="@drawable/keyboard_hint_9" latin:keyHintIcon="@drawable/keyboard_hint_9"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="9" /> latin:popupCharacters="9" />
<Key <Key
latin:keyLabel="з" latin:keyLabel="з"
latin:keyHintIcon="@drawable/keyboard_hint_0" latin:keyHintIcon="@drawable/keyboard_hint_0"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="0" /> latin:popupCharacters="0" />
<Key <Key
latin:keyLabel="х" latin:keyLabel="х"
@ -138,7 +130,6 @@
latin:keyLabel="т" /> latin:keyLabel="т" />
<Key <Key
latin:keyLabel="ь" latin:keyLabel="ь"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_cyrillic_soft_sign" /> latin:popupCharacters="@string/alternates_for_cyrillic_soft_sign" />
<Key <Key
latin:keyLabel="б" /> latin:keyLabel="б" />

View File

@ -27,6 +27,8 @@
latin:keyWidth="9.09%p" latin:keyWidth="9.09%p"
latin:horizontalGap="@dimen/key_horizontal_gap" latin:horizontalGap="@dimen/key_horizontal_gap"
latin:verticalGap="@dimen/key_bottom_gap" latin:verticalGap="@dimen/key_bottom_gap"
latin:popupKeyboardTemplate="@xml/kbd_popup_template"
latin:maxPopupKeyboardColumn="@integer/config_max_popup_keyboard_column"
> >
<include <include
latin:keyboardLayout="@xml/kbd_key_styles" /> latin:keyboardLayout="@xml/kbd_key_styles" />
@ -41,43 +43,33 @@
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<Key <Key
latin:keyLabel="љ" latin:keyLabel="љ"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="1" /> latin:popupCharacters="1" />
<Key <Key
latin:keyLabel="њ" latin:keyLabel="њ"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="2" /> latin:popupCharacters="2" />
<Key <Key
latin:keyLabel="е" latin:keyLabel="е"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="3" /> latin:popupCharacters="3" />
<Key <Key
latin:keyLabel="р" latin:keyLabel="р"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="4" /> latin:popupCharacters="4" />
<Key <Key
latin:keyLabel="т" latin:keyLabel="т"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="5" /> latin:popupCharacters="5" />
<Key <Key
latin:keyLabel="з" latin:keyLabel="з"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="6" /> latin:popupCharacters="6" />
<Key <Key
latin:keyLabel="у" latin:keyLabel="у"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="7" /> latin:popupCharacters="7" />
<Key <Key
latin:keyLabel="и" latin:keyLabel="и"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="8" /> latin:popupCharacters="8" />
<Key <Key
latin:keyLabel="о" latin:keyLabel="о"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="9" /> latin:popupCharacters="9" />
<Key <Key
latin:keyLabel="п" latin:keyLabel="п"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="0" /> latin:popupCharacters="0" />
<Key <Key
latin:keyLabel="ш" /> latin:keyLabel="ш" />
@ -149,14 +141,12 @@
latin:manualTemporaryUpperCaseCode="33" latin:manualTemporaryUpperCaseCode="33"
latin:keyHintIcon="@drawable/key_hint_exclamation_holo" latin:keyHintIcon="@drawable/key_hint_exclamation_holo"
latin:manualTemporaryUpperCaseHintIcon="@drawable/key_hint_exclamation_large_holo" latin:manualTemporaryUpperCaseHintIcon="@drawable/key_hint_exclamation_large_holo"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="!" /> latin:popupCharacters="!" />
<Key <Key
latin:keyLabel="." latin:keyLabel="."
latin:manualTemporaryUpperCaseCode="63" latin:manualTemporaryUpperCaseCode="63"
latin:keyHintIcon="@drawable/key_hint_question_holo" latin:keyHintIcon="@drawable/key_hint_question_holo"
latin:manualTemporaryUpperCaseHintIcon="@drawable/key_hint_question_large_holo" latin:manualTemporaryUpperCaseHintIcon="@drawable/key_hint_question_large_holo"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="\?" /> latin:popupCharacters="\?" />
<Key <Key
latin:keyStyle="shiftKeyStyle" latin:keyStyle="shiftKeyStyle"

View File

@ -27,6 +27,8 @@
latin:keyWidth="9.09%p" latin:keyWidth="9.09%p"
latin:horizontalGap="@dimen/key_horizontal_gap" latin:horizontalGap="@dimen/key_horizontal_gap"
latin:verticalGap="@dimen/key_bottom_gap" latin:verticalGap="@dimen/key_bottom_gap"
latin:popupKeyboardTemplate="@xml/kbd_popup_template"
latin:maxPopupKeyboardColumn="@integer/config_max_popup_keyboard_column"
> >
<include <include
latin:keyboardLayout="@xml/kbd_key_styles" /> latin:keyboardLayout="@xml/kbd_key_styles" />
@ -36,53 +38,43 @@
<Key <Key
latin:keyLabel="љ" latin:keyLabel="љ"
latin:keyHintIcon="@drawable/keyboard_hint_1" latin:keyHintIcon="@drawable/keyboard_hint_1"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="1" latin:popupCharacters="1"
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<Key <Key
latin:keyLabel="њ" latin:keyLabel="њ"
latin:keyHintIcon="@drawable/keyboard_hint_2" latin:keyHintIcon="@drawable/keyboard_hint_2"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="2" /> latin:popupCharacters="2" />
<Key <Key
latin:keyLabel="е" latin:keyLabel="е"
latin:keyHintIcon="@drawable/keyboard_hint_3" latin:keyHintIcon="@drawable/keyboard_hint_3"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="3" /> latin:popupCharacters="3" />
<Key <Key
latin:keyLabel="р" latin:keyLabel="р"
latin:keyHintIcon="@drawable/keyboard_hint_4" latin:keyHintIcon="@drawable/keyboard_hint_4"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="4" /> latin:popupCharacters="4" />
<Key <Key
latin:keyLabel="т" latin:keyLabel="т"
latin:keyHintIcon="@drawable/keyboard_hint_5" latin:keyHintIcon="@drawable/keyboard_hint_5"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="5" /> latin:popupCharacters="5" />
<Key <Key
latin:keyLabel="з" latin:keyLabel="з"
latin:keyHintIcon="@drawable/keyboard_hint_6" latin:keyHintIcon="@drawable/keyboard_hint_6"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="6" /> latin:popupCharacters="6" />
<Key <Key
latin:keyLabel="у" latin:keyLabel="у"
latin:keyHintIcon="@drawable/keyboard_hint_7" latin:keyHintIcon="@drawable/keyboard_hint_7"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="7" /> latin:popupCharacters="7" />
<Key <Key
latin:keyLabel="и" latin:keyLabel="и"
latin:keyHintIcon="@drawable/keyboard_hint_8" latin:keyHintIcon="@drawable/keyboard_hint_8"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="8" /> latin:popupCharacters="8" />
<Key <Key
latin:keyLabel="о" latin:keyLabel="о"
latin:keyHintIcon="@drawable/keyboard_hint_9" latin:keyHintIcon="@drawable/keyboard_hint_9"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="9" /> latin:popupCharacters="9" />
<Key <Key
latin:keyLabel="п" latin:keyLabel="п"
latin:keyHintIcon="@drawable/keyboard_hint_0" latin:keyHintIcon="@drawable/keyboard_hint_0"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="0" /> latin:popupCharacters="0" />
<Key <Key
latin:keyLabel="ш" latin:keyLabel="ш"

View File

@ -33,6 +33,8 @@
latin:rowHeight="25%p" latin:rowHeight="25%p"
latin:horizontalGap="@dimen/key_horizontal_gap" latin:horizontalGap="@dimen/key_horizontal_gap"
latin:verticalGap="@dimen/key_bottom_gap" latin:verticalGap="@dimen/key_bottom_gap"
latin:popupKeyboardTemplate="@xml/kbd_popup_template"
latin:maxPopupKeyboardColumn="@integer/config_max_popup_keyboard_column"
> >
<include <include
latin:keyboardLayout="@xml/kbd_qwerty_rows_scandinavia" /> latin:keyboardLayout="@xml/kbd_qwerty_rows_scandinavia" />

View File

@ -34,6 +34,8 @@
latin:keyWidth="9.09%p" latin:keyWidth="9.09%p"
latin:horizontalGap="@dimen/key_horizontal_gap" latin:horizontalGap="@dimen/key_horizontal_gap"
latin:verticalGap="@dimen/key_bottom_gap" latin:verticalGap="@dimen/key_bottom_gap"
latin:popupKeyboardTemplate="@xml/kbd_popup_template"
latin:maxPopupKeyboardColumn="@integer/config_max_popup_keyboard_column"
> >
<include <include
latin:keyboardLayout="@xml/kbd_qwerty_rows_scandinavia" /> latin:keyboardLayout="@xml/kbd_qwerty_rows_scandinavia" />

View File

@ -1,46 +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:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
latin:keyWidth="4.0%p"
latin:horizontalGap="0px"
latin:verticalGap="0px"
latin:rowHeight="@dimen/popup_key_height"
>
<Row
latin:rowEdgeFlags="top|bottom"
>
<Key
latin:keyLabel="@string/popular_domain_1"
latin:keyOutputText="@string/popular_domain_1"
latin:keyEdgeFlags="left" />
<Key
latin:keyLabel="@string/popular_domain_2"
latin:keyOutputText="@string/popular_domain_2" />
<Key
latin:keyLabel="@string/popular_domain_3"
latin:keyOutputText="@string/popular_domain_3" />
<Key
latin:keyLabel="@string/popular_domain_4"
latin:keyOutputText="@string/popular_domain_4"
latin:keyEdgeFlags="right" />
</Row>
</Keyboard>

View File

@ -1,89 +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:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
latin:keyWidth="4.0%p"
latin:horizontalGap="0px"
latin:verticalGap="0px"
latin:rowHeight="@dimen/popup_key_height"
>
<Row
latin:rowEdgeFlags="top"
>
<Key
latin:keyLabel=":-)"
latin:keyOutputText=":-) "
latin:keyEdgeFlags="left" />
<Key
latin:keyLabel=":-("
latin:keyOutputText=":-( " />
<Key
latin:keyLabel=";-)"
latin:keyOutputText=";-) " />
<Key
latin:keyLabel=":-P"
latin:keyOutputText=":-P " />
<Key
latin:keyLabel="=-O"
latin:keyOutputText="=-O "
latin:keyEdgeFlags="right" />
</Row>
<Row>
<Key
latin:keyLabel=":-*"
latin:keyOutputText=":-* "
latin:keyEdgeFlags="left" />
<Key
latin:keyLabel=":O"
latin:keyOutputText=":O " />
<Key
latin:keyLabel="B-)"
latin:keyOutputText="B-) " />
<Key
latin:keyLabel=":-$"
latin:keyOutputText=":-$ " />
<Key
latin:keyLabel=":-!"
latin:keyOutputText=":-! "
latin:keyEdgeFlags="right" />
</Row>
<Row
latin:rowEdgeFlags="bottom"
>
<Key
latin:keyLabel=":-["
latin:keyOutputText=":-[ "
latin:keyEdgeFlags="left" />
<Key
latin:keyLabel="O:-)"
latin:keyOutputText="O:-) " />
<Key
latin:keyLabel=":-\\"
latin:keyOutputText=":-\\ " />
<Key
latin:keyLabel=":'("
latin:keyOutputText=":'( " />
<Key
latin:keyLabel=":-D"
latin:keyOutputText=":-D "
latin:keyEdgeFlags="right" />
</Row>
</Keyboard>

View File

@ -33,43 +33,33 @@
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<Key <Key
latin:keyLabel="a" latin:keyLabel="a"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_a" /> latin:popupCharacters="@string/alternates_for_a" />
<Key <Key
latin:keyLabel="z" latin:keyLabel="z"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_z" /> latin:popupCharacters="@string/alternates_for_z" />
<Key <Key
latin:keyLabel="e" latin:keyLabel="e"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_e" /> latin:popupCharacters="@string/alternates_for_e" />
<Key <Key
latin:keyLabel="r" latin:keyLabel="r"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_r" /> latin:popupCharacters="@string/alternates_for_r" />
<Key <Key
latin:keyLabel="t" latin:keyLabel="t"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_t" /> latin:popupCharacters="@string/alternates_for_t" />
<Key <Key
latin:keyLabel="y" latin:keyLabel="y"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_y" /> latin:popupCharacters="@string/alternates_for_y" />
<Key <Key
latin:keyLabel="u" latin:keyLabel="u"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_u" /> latin:popupCharacters="@string/alternates_for_u" />
<Key <Key
latin:keyLabel="i" latin:keyLabel="i"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_i" /> latin:popupCharacters="@string/alternates_for_i" />
<Key <Key
latin:keyLabel="o" latin:keyLabel="o"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_o" /> latin:popupCharacters="@string/alternates_for_o" />
<Key <Key
latin:keyLabel="p" latin:keyLabel="p"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_p" /> latin:popupCharacters="@string/alternates_for_p" />
<Key <Key
latin:keyStyle="deleteKeyStyle" latin:keyStyle="deleteKeyStyle"
@ -86,21 +76,17 @@
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<Key <Key
latin:keyLabel="q" latin:keyLabel="q"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_q" /> latin:popupCharacters="@string/alternates_for_q" />
<Key <Key
latin:keyLabel="s" latin:keyLabel="s"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_s" /> latin:popupCharacters="@string/alternates_for_s" />
<Key <Key
latin:keyLabel="d" latin:keyLabel="d"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_d" /> latin:popupCharacters="@string/alternates_for_d" />
<Key <Key
latin:keyLabel="f" /> latin:keyLabel="f" />
<Key <Key
latin:keyLabel="g" latin:keyLabel="g"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_g" /> latin:popupCharacters="@string/alternates_for_g" />
<Key <Key
latin:keyLabel="h" /> latin:keyLabel="h" />
@ -110,7 +96,6 @@
latin:keyLabel="k" /> latin:keyLabel="k" />
<Key <Key
latin:keyLabel="l" latin:keyLabel="l"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_l" /> latin:popupCharacters="@string/alternates_for_l" />
<Key <Key
latin:keyLabel="m" latin:keyLabel="m"
@ -129,30 +114,25 @@
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<Key <Key
latin:keyLabel="w" latin:keyLabel="w"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_w" /> latin:popupCharacters="@string/alternates_for_w" />
<Key <Key
latin:keyLabel="x" /> latin:keyLabel="x" />
<Key <Key
latin:keyLabel="c" latin:keyLabel="c"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_c" /> latin:popupCharacters="@string/alternates_for_c" />
<Key <Key
latin:keyLabel="v" latin:keyLabel="v"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_v" /> latin:popupCharacters="@string/alternates_for_v" />
<Key <Key
latin:keyLabel="b" /> latin:keyLabel="b" />
<Key <Key
latin:keyLabel="n" latin:keyLabel="n"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_n" /> latin:popupCharacters="@string/alternates_for_n" />
<Key <Key
latin:keyLabel="\'" latin:keyLabel="\'"
latin:manualTemporaryUpperCaseCode="58" latin:manualTemporaryUpperCaseCode="58"
latin:keyHintIcon="@drawable/key_hint_colon_holo" latin:keyHintIcon="@drawable/key_hint_colon_holo"
latin:manualTemporaryUpperCaseHintIcon="@drawable/key_hint_colon_large_holo" latin:manualTemporaryUpperCaseHintIcon="@drawable/key_hint_colon_large_holo"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters=":" /> latin:popupCharacters=":" />
<switch> <switch>
<case <case
@ -169,14 +149,12 @@
latin:manualTemporaryUpperCaseCode="33" latin:manualTemporaryUpperCaseCode="33"
latin:keyHintIcon="@drawable/key_hint_exclamation_holo" latin:keyHintIcon="@drawable/key_hint_exclamation_holo"
latin:manualTemporaryUpperCaseHintIcon="@drawable/key_hint_exclamation_large_holo" latin:manualTemporaryUpperCaseHintIcon="@drawable/key_hint_exclamation_large_holo"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="!" /> latin:popupCharacters="!" />
<Key <Key
latin:keyLabel="." latin:keyLabel="."
latin:manualTemporaryUpperCaseCode="63" latin:manualTemporaryUpperCaseCode="63"
latin:keyHintIcon="@drawable/key_hint_question_holo" latin:keyHintIcon="@drawable/key_hint_question_holo"
latin:manualTemporaryUpperCaseHintIcon="@drawable/key_hint_question_large_holo" latin:manualTemporaryUpperCaseHintIcon="@drawable/key_hint_question_large_holo"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="\?" /> latin:popupCharacters="\?" />
</default> </default>
</switch> </switch>

View File

@ -62,11 +62,11 @@
latin:iconPreview="@drawable/sym_keyboard_feedback_space" /> latin:iconPreview="@drawable/sym_keyboard_feedback_space" />
<key-style <key-style
latin:styleName="smileyKeyStyle" latin:styleName="smileyKeyStyle"
latin:codes="0"
latin:keyIcon="@drawable/sym_keyboard_smiley_holo" latin:keyIcon="@drawable/sym_keyboard_smiley_holo"
latin:keyOutputText=";-) " latin:keyOutputText=";-) "
latin:keyHintIcon="@drawable/hint_popup_holo" latin:keyHintIcon="@drawable/hint_popup_holo"
latin:popupKeyboard="@xml/popup_smileys" /> latin:popupCharacters="@string/alternates_for_smiley"
latin:maxPopupKeyboardColumn="5" />
<key-style <key-style
latin:styleName="micKeyStyle" latin:styleName="micKeyStyle"
latin:codes="@integer/key_voice" latin:codes="@integer/key_voice"
@ -115,7 +115,8 @@
latin:keyLabel=";-)" latin:keyLabel=";-)"
latin:keyOutputText=";-) " latin:keyOutputText=";-) "
latin:keyHintIcon="@drawable/hint_popup_holo" latin:keyHintIcon="@drawable/hint_popup_holo"
latin:popupKeyboard="@xml/popup_smileys" /> latin:popupCharacters="@string/alternates_for_smiley"
latin:maxPopupKeyboardColumn="5" />
<key-style <key-style
latin:styleName="micKeyStyle" latin:styleName="micKeyStyle"
latin:codes="@integer/key_voice" latin:codes="@integer/key_voice"
@ -151,9 +152,9 @@
latin:isSticky="true" /> latin:isSticky="true" />
<key-style <key-style
latin:styleName="comKeyStyle" latin:styleName="comKeyStyle"
latin:keyLabel="@string/popular_domain_0" latin:keyLabel="@string/keylabel_for_popular_domain"
latin:keyLabelOption="fontNormal" latin:keyLabelOption="fontNormal"
latin:keyOutputText="@string/popular_domain_0" latin:keyOutputText="@string/keylabel_for_popular_domain"
latin:keyHintIcon="@drawable/hint_popup_holo" latin:keyHintIcon="@drawable/hint_popup_holo"
latin:popupKeyboard="@xml/popup_domains" /> latin:popupCharacters="@string/alternates_for_popular_domain" />
</merge> </merge>

View File

@ -26,6 +26,8 @@
latin:keyWidth="11.949%p" latin:keyWidth="11.949%p"
latin:horizontalGap="@dimen/key_horizontal_gap" latin:horizontalGap="@dimen/key_horizontal_gap"
latin:verticalGap="@dimen/key_bottom_gap" latin:verticalGap="@dimen/key_bottom_gap"
latin:popupKeyboardTemplate="@xml/kbd_popup_template"
latin:maxPopupKeyboardColumn="@integer/config_max_popup_keyboard_column"
> >
<include <include
latin:keyboardLayout="@xml/kbd_key_styles" /> latin:keyboardLayout="@xml/kbd_key_styles" />

View File

@ -26,6 +26,8 @@
latin:keyWidth="11.949%p" latin:keyWidth="11.949%p"
latin:horizontalGap="@dimen/key_horizontal_gap" latin:horizontalGap="@dimen/key_horizontal_gap"
latin:verticalGap="@dimen/key_bottom_gap" latin:verticalGap="@dimen/key_bottom_gap"
latin:popupKeyboardTemplate="@xml/kbd_popup_template"
latin:maxPopupKeyboardColumn="@integer/config_max_popup_keyboard_column"
> >
<include <include
latin:keyboardLayout="@xml/kbd_key_styles" /> latin:keyboardLayout="@xml/kbd_key_styles" />

View File

@ -26,6 +26,8 @@
latin:keyWidth="11.949%p" latin:keyWidth="11.949%p"
latin:horizontalGap="@dimen/key_horizontal_gap" latin:horizontalGap="@dimen/key_horizontal_gap"
latin:verticalGap="@dimen/key_bottom_gap" latin:verticalGap="@dimen/key_bottom_gap"
latin:popupKeyboardTemplate="@xml/kbd_popup_template"
latin:maxPopupKeyboardColumn="@integer/config_max_popup_keyboard_column"
> >
<include <include
latin:keyboardLayout="@xml/kbd_key_styles" /> latin:keyboardLayout="@xml/kbd_key_styles" />

View File

@ -25,6 +25,8 @@
latin:rowHeight="25%p" latin:rowHeight="25%p"
latin:horizontalGap="@dimen/key_horizontal_gap" latin:horizontalGap="@dimen/key_horizontal_gap"
latin:verticalGap="@dimen/key_bottom_gap" latin:verticalGap="@dimen/key_bottom_gap"
latin:popupKeyboardTemplate="@xml/kbd_popup_template"
latin:maxPopupKeyboardColumn="@integer/config_max_popup_keyboard_column"
> >
<include <include
latin:keyboardLayout="@xml/kbd_qwerty_rows" /> latin:keyboardLayout="@xml/kbd_qwerty_rows" />

View File

@ -32,43 +32,33 @@
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<Key <Key
latin:keyLabel="q" latin:keyLabel="q"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_q" /> latin:popupCharacters="@string/alternates_for_q" />
<Key <Key
latin:keyLabel="w" latin:keyLabel="w"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_w" /> latin:popupCharacters="@string/alternates_for_w" />
<Key <Key
latin:keyLabel="e" latin:keyLabel="e"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_e" /> latin:popupCharacters="@string/alternates_for_e" />
<Key <Key
latin:keyLabel="r" latin:keyLabel="r"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_r" /> latin:popupCharacters="@string/alternates_for_r" />
<Key <Key
latin:keyLabel="t" latin:keyLabel="t"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_t" /> latin:popupCharacters="@string/alternates_for_t" />
<Key <Key
latin:keyLabel="y" latin:keyLabel="y"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_y" /> latin:popupCharacters="@string/alternates_for_y" />
<Key <Key
latin:keyLabel="u" latin:keyLabel="u"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_u" /> latin:popupCharacters="@string/alternates_for_u" />
<Key <Key
latin:keyLabel="i" latin:keyLabel="i"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_i" /> latin:popupCharacters="@string/alternates_for_i" />
<Key <Key
latin:keyLabel="o" latin:keyLabel="o"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_o" /> latin:popupCharacters="@string/alternates_for_o" />
<Key <Key
latin:keyLabel="p" latin:keyLabel="p"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_p" /> latin:popupCharacters="@string/alternates_for_p" />
<Key <Key
latin:keyStyle="deleteKeyStyle" latin:keyStyle="deleteKeyStyle"

View File

@ -31,21 +31,17 @@
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<Key <Key
latin:keyLabel="a" latin:keyLabel="a"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_a" /> latin:popupCharacters="@string/alternates_for_a" />
<Key <Key
latin:keyLabel="s" latin:keyLabel="s"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_s" /> latin:popupCharacters="@string/alternates_for_s" />
<Key <Key
latin:keyLabel="d" latin:keyLabel="d"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_d" /> latin:popupCharacters="@string/alternates_for_d" />
<Key <Key
latin:keyLabel="f" /> latin:keyLabel="f" />
<Key <Key
latin:keyLabel="g" latin:keyLabel="g"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_g" /> latin:popupCharacters="@string/alternates_for_g" />
<Key <Key
latin:keyLabel="h" /> latin:keyLabel="h" />
@ -55,7 +51,6 @@
latin:keyLabel="k" /> latin:keyLabel="k" />
<Key <Key
latin:keyLabel="l" latin:keyLabel="l"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_l" /> latin:popupCharacters="@string/alternates_for_l" />
<Key <Key
latin:keyStyle="returnKeyStyle" latin:keyStyle="returnKeyStyle"

View File

@ -30,23 +30,19 @@
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<Key <Key
latin:keyLabel="z" latin:keyLabel="z"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_z" /> latin:popupCharacters="@string/alternates_for_z" />
<Key <Key
latin:keyLabel="x" /> latin:keyLabel="x" />
<Key <Key
latin:keyLabel="c" latin:keyLabel="c"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_c" /> latin:popupCharacters="@string/alternates_for_c" />
<Key <Key
latin:keyLabel="v" latin:keyLabel="v"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_v" /> latin:popupCharacters="@string/alternates_for_v" />
<Key <Key
latin:keyLabel="b" /> latin:keyLabel="b" />
<Key <Key
latin:keyLabel="n" latin:keyLabel="n"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_n" /> latin:popupCharacters="@string/alternates_for_n" />
<Key <Key
latin:keyLabel="m" /> latin:keyLabel="m" />
@ -65,14 +61,12 @@
latin:manualTemporaryUpperCaseCode="33" latin:manualTemporaryUpperCaseCode="33"
latin:keyHintIcon="@drawable/key_hint_exclamation_holo" latin:keyHintIcon="@drawable/key_hint_exclamation_holo"
latin:manualTemporaryUpperCaseHintIcon="@drawable/key_hint_exclamation_large_holo" latin:manualTemporaryUpperCaseHintIcon="@drawable/key_hint_exclamation_large_holo"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="!" /> latin:popupCharacters="!" />
<Key <Key
latin:keyLabel="." latin:keyLabel="."
latin:manualTemporaryUpperCaseCode="63" latin:manualTemporaryUpperCaseCode="63"
latin:keyHintIcon="@drawable/key_hint_question_holo" latin:keyHintIcon="@drawable/key_hint_question_holo"
latin:manualTemporaryUpperCaseHintIcon="@drawable/key_hint_question_large_holo" latin:manualTemporaryUpperCaseHintIcon="@drawable/key_hint_question_large_holo"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="\?" /> latin:popupCharacters="\?" />
</default> </default>
</switch> </switch>

View File

@ -54,7 +54,6 @@
latin:manualTemporaryUpperCaseCode="43" latin:manualTemporaryUpperCaseCode="43"
latin:keyHintIcon="@drawable/key_hint_plus_holo" latin:keyHintIcon="@drawable/key_hint_plus_holo"
latin:manualTemporaryUpperCaseHintIcon="@drawable/key_hint_plus_large_holo" latin:manualTemporaryUpperCaseHintIcon="@drawable/key_hint_plus_large_holo"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="+" /> latin:popupCharacters="+" />
</case> </case>
<default> <default>
@ -67,7 +66,6 @@
latin:manualTemporaryUpperCaseCode="64" latin:manualTemporaryUpperCaseCode="64"
latin:keyHintIcon="@drawable/key_hint_at_holo" latin:keyHintIcon="@drawable/key_hint_at_holo"
latin:manualTemporaryUpperCaseHintIcon="@drawable/key_hint_at_large_holo" latin:manualTemporaryUpperCaseHintIcon="@drawable/key_hint_at_large_holo"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="\@" /> latin:popupCharacters="\@" />
</default> </default>
</switch> </switch>
@ -89,7 +87,6 @@
latin:manualTemporaryUpperCaseCode="58" latin:manualTemporaryUpperCaseCode="58"
latin:keyHintIcon="@drawable/key_hint_colon_holo" latin:keyHintIcon="@drawable/key_hint_colon_holo"
latin:manualTemporaryUpperCaseHintIcon="@drawable/key_hint_colon_large_holo" latin:manualTemporaryUpperCaseHintIcon="@drawable/key_hint_colon_large_holo"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters=":" /> latin:popupCharacters=":" />
</case> </case>
<default> <default>
@ -98,7 +95,6 @@
latin:manualTemporaryUpperCaseCode="34" latin:manualTemporaryUpperCaseCode="34"
latin:keyHintIcon="@drawable/key_hint_quote_holo" latin:keyHintIcon="@drawable/key_hint_quote_holo"
latin:manualTemporaryUpperCaseHintIcon="@drawable/key_hint_quote_large_holo" latin:manualTemporaryUpperCaseHintIcon="@drawable/key_hint_quote_large_holo"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="&quot;" /> latin:popupCharacters="&quot;" />
</default> </default>
</switch> </switch>
@ -115,7 +111,6 @@
latin:manualTemporaryUpperCaseCode="95" latin:manualTemporaryUpperCaseCode="95"
latin:keyHintIcon="@drawable/key_hint_underline_holo" latin:keyHintIcon="@drawable/key_hint_underline_holo"
latin:manualTemporaryUpperCaseHintIcon="@drawable/key_hint_underline_large_holo" latin:manualTemporaryUpperCaseHintIcon="@drawable/key_hint_underline_large_holo"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="_" /> latin:popupCharacters="_" />
</default> </default>
</switch> </switch>

View File

@ -33,43 +33,33 @@
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<Key <Key
latin:keyLabel="q" latin:keyLabel="q"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_q" /> latin:popupCharacters="@string/alternates_for_q" />
<Key <Key
latin:keyLabel="w" latin:keyLabel="w"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_w" /> latin:popupCharacters="@string/alternates_for_w" />
<Key <Key
latin:keyLabel="e" latin:keyLabel="e"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_e" /> latin:popupCharacters="@string/alternates_for_e" />
<Key <Key
latin:keyLabel="r" latin:keyLabel="r"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_r" /> latin:popupCharacters="@string/alternates_for_r" />
<Key <Key
latin:keyLabel="t" latin:keyLabel="t"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_t" /> latin:popupCharacters="@string/alternates_for_t" />
<Key <Key
latin:keyLabel="y" latin:keyLabel="y"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_y" /> latin:popupCharacters="@string/alternates_for_y" />
<Key <Key
latin:keyLabel="u" latin:keyLabel="u"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_u" /> latin:popupCharacters="@string/alternates_for_u" />
<Key <Key
latin:keyLabel="i" latin:keyLabel="i"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_i" /> latin:popupCharacters="@string/alternates_for_i" />
<Key <Key
latin:keyLabel="o" latin:keyLabel="o"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_o" /> latin:popupCharacters="@string/alternates_for_o" />
<Key <Key
latin:keyLabel="p" latin:keyLabel="p"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_p" /> latin:popupCharacters="@string/alternates_for_p" />
<Key <Key
latin:keyLabel="å" /> latin:keyLabel="å" />
@ -88,21 +78,17 @@
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<Key <Key
latin:keyLabel="a" latin:keyLabel="a"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_a" /> latin:popupCharacters="@string/alternates_for_a" />
<Key <Key
latin:keyLabel="s" latin:keyLabel="s"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_s" /> latin:popupCharacters="@string/alternates_for_s" />
<Key <Key
latin:keyLabel="d" latin:keyLabel="d"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_d" /> latin:popupCharacters="@string/alternates_for_d" />
<Key <Key
latin:keyLabel="f" /> latin:keyLabel="f" />
<Key <Key
latin:keyLabel="g" latin:keyLabel="g"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_g" /> latin:popupCharacters="@string/alternates_for_g" />
<Key <Key
latin:keyLabel="h" /> latin:keyLabel="h" />
@ -112,15 +98,12 @@
latin:keyLabel="k" /> latin:keyLabel="k" />
<Key <Key
latin:keyLabel="l" latin:keyLabel="l"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_l" /> latin:popupCharacters="@string/alternates_for_l" />
<Key <Key
latin:keyLabel="@string/keylabel_for_scandinavia_row2_10" latin:keyLabel="@string/keylabel_for_scandinavia_row2_10"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_scandinavia_row2_10" /> latin:popupCharacters="@string/alternates_for_scandinavia_row2_10" />
<Key <Key
latin:keyLabel="@string/keylabel_for_scandinavia_row2_11" latin:keyLabel="@string/keylabel_for_scandinavia_row2_11"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_scandinavia_row2_11" /> latin:popupCharacters="@string/alternates_for_scandinavia_row2_11" />
<Key <Key
latin:keyStyle="returnKeyStyle" latin:keyStyle="returnKeyStyle"

View File

@ -33,43 +33,33 @@
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<Key <Key
latin:keyLabel="q" latin:keyLabel="q"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_q" /> latin:popupCharacters="@string/alternates_for_q" />
<Key <Key
latin:keyLabel="w" latin:keyLabel="w"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_w" /> latin:popupCharacters="@string/alternates_for_w" />
<Key <Key
latin:keyLabel="e" latin:keyLabel="e"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_e" /> latin:popupCharacters="@string/alternates_for_e" />
<Key <Key
latin:keyLabel="r" latin:keyLabel="r"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_r" /> latin:popupCharacters="@string/alternates_for_r" />
<Key <Key
latin:keyLabel="t" latin:keyLabel="t"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_t" /> latin:popupCharacters="@string/alternates_for_t" />
<Key <Key
latin:keyLabel="z" latin:keyLabel="z"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_z" /> latin:popupCharacters="@string/alternates_for_z" />
<Key <Key
latin:keyLabel="u" latin:keyLabel="u"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_u" /> latin:popupCharacters="@string/alternates_for_u" />
<Key <Key
latin:keyLabel="i" latin:keyLabel="i"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_i" /> latin:popupCharacters="@string/alternates_for_i" />
<Key <Key
latin:keyLabel="o" latin:keyLabel="o"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_o" /> latin:popupCharacters="@string/alternates_for_o" />
<Key <Key
latin:keyLabel="p" latin:keyLabel="p"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_p" /> latin:popupCharacters="@string/alternates_for_p" />
<Key <Key
latin:keyStyle="deleteKeyStyle" latin:keyStyle="deleteKeyStyle"
@ -87,23 +77,19 @@
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<Key <Key
latin:keyLabel="y" latin:keyLabel="y"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_y" /> latin:popupCharacters="@string/alternates_for_y" />
<Key <Key
latin:keyLabel="x" /> latin:keyLabel="x" />
<Key <Key
latin:keyLabel="c" latin:keyLabel="c"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_c" /> latin:popupCharacters="@string/alternates_for_c" />
<Key <Key
latin:keyLabel="v" latin:keyLabel="v"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_v" /> latin:popupCharacters="@string/alternates_for_v" />
<Key <Key
latin:keyLabel="b" /> latin:keyLabel="b" />
<Key <Key
latin:keyLabel="n" latin:keyLabel="n"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_n" /> latin:popupCharacters="@string/alternates_for_n" />
<Key <Key
latin:keyLabel="m" /> latin:keyLabel="m" />
@ -122,14 +108,12 @@
latin:manualTemporaryUpperCaseCode="33" latin:manualTemporaryUpperCaseCode="33"
latin:keyHintIcon="@drawable/key_hint_exclamation_holo" latin:keyHintIcon="@drawable/key_hint_exclamation_holo"
latin:manualTemporaryUpperCaseHintIcon="@drawable/key_hint_exclamation_large_holo" latin:manualTemporaryUpperCaseHintIcon="@drawable/key_hint_exclamation_large_holo"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="!" /> latin:popupCharacters="!" />
<Key <Key
latin:keyLabel="." latin:keyLabel="."
latin:manualTemporaryUpperCaseCode="63" latin:manualTemporaryUpperCaseCode="63"
latin:keyHintIcon="@drawable/key_hint_question_holo" latin:keyHintIcon="@drawable/key_hint_question_holo"
latin:manualTemporaryUpperCaseHintIcon="@drawable/key_hint_question_large_holo" latin:manualTemporaryUpperCaseHintIcon="@drawable/key_hint_question_large_holo"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="\?" /> latin:popupCharacters="\?" />
</default> </default>
</switch> </switch>

View File

@ -25,6 +25,8 @@
latin:rowHeight="25%p" latin:rowHeight="25%p"
latin:horizontalGap="@dimen/key_horizontal_gap" latin:horizontalGap="@dimen/key_horizontal_gap"
latin:verticalGap="@dimen/key_bottom_gap" latin:verticalGap="@dimen/key_bottom_gap"
latin:popupKeyboardTemplate="@xml/kbd_popup_template"
latin:maxPopupKeyboardColumn="@integer/config_max_popup_keyboard_column"
> >
<include <include
latin:keyboardLayout="@xml/kbd_key_styles" /> latin:keyboardLayout="@xml/kbd_key_styles" />
@ -39,29 +41,23 @@
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<Key <Key
latin:keyLabel="1" latin:keyLabel="1"
latin:popupKeyboard="@xml/kbd_popup_template" latin:popupCharacters="¹,½,⅓,¼,⅛" />
latin:popupCharacters="¹½⅓¼⅛" />
<Key <Key
latin:keyLabel="2" latin:keyLabel="2"
latin:popupKeyboard="@xml/kbd_popup_template" latin:popupCharacters="²,⅔" />
latin:popupCharacters="²⅔" />
<Key <Key
latin:keyLabel="3" latin:keyLabel="3"
latin:popupKeyboard="@xml/kbd_popup_template" latin:popupCharacters="³,¾,⅜" />
latin:popupCharacters="³¾⅜" />
<Key <Key
latin:keyLabel="4" latin:keyLabel="4"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="⁴" /> latin:popupCharacters="⁴" />
<Key <Key
latin:keyLabel="5" latin:keyLabel="5"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="⅝" /> latin:popupCharacters="⅝" />
<Key <Key
latin:keyLabel="6" /> latin:keyLabel="6" />
<Key <Key
latin:keyLabel="7" latin:keyLabel="7"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="⅞" /> latin:popupCharacters="⅞" />
<Key <Key
latin:keyLabel="8" /> latin:keyLabel="8" />
@ -69,8 +65,7 @@
latin:keyLabel="9" /> latin:keyLabel="9" />
<Key <Key
latin:keyLabel="0" latin:keyLabel="0"
latin:popupKeyboard="@xml/kbd_popup_template" latin:popupCharacters="ⁿ,∅" />
latin:popupCharacters="ⁿ∅" />
<Key <Key
latin:keyStyle="deleteKeyStyle" latin:keyStyle="deleteKeyStyle"
latin:keyWidth="9.331%p" latin:keyWidth="9.331%p"
@ -88,34 +83,27 @@
latin:keyLabel="#" /> latin:keyLabel="#" />
<Key <Key
latin:keyLabel="$" latin:keyLabel="$"
latin:popupKeyboard="@xml/kbd_popup_template" latin:popupCharacters="¢,£,€,¥,₣,₤,₱" />
latin:popupCharacters="¢£€¥₣₤₱" />
<Key <Key
latin:keyLabel="%" latin:keyLabel="%"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="‰" /> latin:popupCharacters="‰" />
<Key <Key
latin:keyLabel="&amp;" /> latin:keyLabel="&amp;" />
<Key <Key
latin:keyLabel="*" latin:keyLabel="*"
latin:popupKeyboard="@xml/kbd_popup_template" latin:popupCharacters="†,‡,★" />
latin:popupCharacters="†‡★" />
<Key <Key
latin:keyLabel="-" latin:keyLabel="-"
latin:popupKeyboard="@xml/kbd_popup_template" latin:popupCharacters="_,,—" />
latin:popupCharacters="_—" />
<Key <Key
latin:keyLabel="+" latin:keyLabel="+"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="±" /> latin:popupCharacters="±" />
<Key <Key
latin:keyLabel="(" latin:keyLabel="("
latin:popupKeyboard="@xml/kbd_popup_template" latin:popupCharacters="[,{,&lt;" />
latin:popupCharacters="[{&lt;" />
<Key <Key
latin:keyLabel=")" latin:keyLabel=")"
latin:popupKeyboard="@xml/kbd_popup_template" latin:popupCharacters="],},&gt;" />
latin:popupCharacters="]}&gt;" />
<Key <Key
latin:keyStyle="returnKeyStyle" latin:keyStyle="returnKeyStyle"
latin:keyWidth="15.750%p" latin:keyWidth="15.750%p"
@ -130,16 +118,13 @@
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<Key <Key
latin:keyLabel="&lt;" latin:keyLabel="&lt;"
latin:popupKeyboard="@xml/kbd_popup_template" latin:popupCharacters="≤,«," />
latin:popupCharacters="≤«‹" />
<Key <Key
latin:keyLabel="&gt;" latin:keyLabel="&gt;"
latin:popupKeyboard="@xml/kbd_popup_template" latin:popupCharacters="≥,»," />
latin:popupCharacters="≥»›" />
<Key <Key
latin:keyLabel="=" latin:keyLabel="="
latin:popupKeyboard="@xml/kbd_popup_template" latin:popupCharacters="≠,≈" />
latin:popupCharacters="≠≈" />
<Key <Key
latin:keyLabel=":" /> latin:keyLabel=":" />
<Key <Key
@ -150,11 +135,9 @@
latin:keyLabel="." /> latin:keyLabel="." />
<Key <Key
latin:keyLabel="!" latin:keyLabel="!"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="¡" /> latin:popupCharacters="¡" />
<Key <Key
latin:keyLabel="\?" latin:keyLabel="\?"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="¿" /> latin:popupCharacters="¿" />
<Key <Key
latin:keyStyle="moreKeyStyle" latin:keyStyle="moreKeyStyle"
@ -176,8 +159,7 @@
latin:keyWidth="37.454%p" /> latin:keyWidth="37.454%p" />
<Key <Key
latin:keyLabel="&quot;" latin:keyLabel="&quot;"
latin:popupKeyboard="@xml/kbd_popup_template" latin:popupCharacters="“,”,«,»,˝" />
latin:popupCharacters="“”«»˝" />
<Key <Key
latin:keyLabel="_" /> latin:keyLabel="_" />
<Key <Key

View File

@ -25,6 +25,8 @@
latin:rowHeight="25%p" latin:rowHeight="25%p"
latin:horizontalGap="@dimen/key_horizontal_gap" latin:horizontalGap="@dimen/key_horizontal_gap"
latin:verticalGap="@dimen/key_bottom_gap" latin:verticalGap="@dimen/key_bottom_gap"
latin:popupKeyboardTemplate="@xml/kbd_popup_template"
latin:maxPopupKeyboardColumn="@integer/config_max_popup_keyboard_column"
> >
<include <include
latin:keyboardLayout="@xml/kbd_key_styles" /> latin:keyboardLayout="@xml/kbd_key_styles" />
@ -45,13 +47,11 @@
latin:keyLabel="|" /> latin:keyLabel="|" />
<Key <Key
latin:keyLabel="•" latin:keyLabel="•"
latin:popupKeyboard="@xml/kbd_popup_template" latin:popupCharacters="♪,♥,♠,♦,♣" />
latin:popupCharacters="♪♥♠♦♣" />
<Key <Key
latin:keyLabel="√" /> latin:keyLabel="√" />
<Key <Key
latin:keyLabel="π" latin:keyLabel="π"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="Π" /> latin:popupCharacters="Π" />
<Key <Key
latin:keyLabel="÷" /> latin:keyLabel="÷" />
@ -59,7 +59,6 @@
latin:keyLabel="×" /> latin:keyLabel="×" />
<Key <Key
latin:keyLabel="§" latin:keyLabel="§"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="¶" /> latin:popupCharacters="¶" />
<Key <Key
latin:keyLabel="Δ" /> latin:keyLabel="Δ" />
@ -86,13 +85,11 @@
latin:keyLabel="¥" /> latin:keyLabel="¥" />
<Key <Key
latin:keyLabel="^" latin:keyLabel="^"
latin:popupKeyboard="@xml/kbd_popup_template" latin:popupCharacters="↑,↓,←,→" />
latin:popupCharacters="↑↓←→" />
<Key <Key
latin:keyLabel="°" /> latin:keyLabel="°" />
<Key <Key
latin:keyLabel="±" latin:keyLabel="±"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="∞" /> latin:popupCharacters="∞" />
<Key <Key
latin:keyLabel="{" /> latin:keyLabel="{" />

View File

@ -1,46 +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:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
latin:keyWidth="5.5%p"
latin:horizontalGap="0px"
latin:verticalGap="0px"
latin:rowHeight="@dimen/popup_key_height"
>
<Row
latin:rowEdgeFlags="top|bottom"
>
<Key
latin:keyLabel="@string/popular_domain_1"
latin:keyOutputText="@string/popular_domain_1"
latin:keyEdgeFlags="left" />
<Key
latin:keyLabel="@string/popular_domain_2"
latin:keyOutputText="@string/popular_domain_2" />
<Key
latin:keyLabel="@string/popular_domain_3"
latin:keyOutputText="@string/popular_domain_3" />
<Key
latin:keyLabel="@string/popular_domain_4"
latin:keyOutputText="@string/popular_domain_4"
latin:keyEdgeFlags="right" />
</Row>
</Keyboard>

View File

@ -1,89 +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:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
latin:keyWidth="5.0%p"
latin:horizontalGap="0px"
latin:verticalGap="0px"
latin:rowHeight="@dimen/popup_key_height"
>
<Row
latin:rowEdgeFlags="top"
>
<Key
latin:keyLabel=":-)"
latin:keyOutputText=":-) "
latin:keyEdgeFlags="left" />
<Key
latin:keyLabel=":-("
latin:keyOutputText=":-( " />
<Key
latin:keyLabel=";-)"
latin:keyOutputText=";-) " />
<Key
latin:keyLabel=":-P"
latin:keyOutputText=":-P " />
<Key
latin:keyLabel="=-O"
latin:keyOutputText="=-O "
latin:keyEdgeFlags="right" />
</Row>
<Row>
<Key
latin:keyLabel=":-*"
latin:keyOutputText=":-* "
latin:keyEdgeFlags="left" />
<Key
latin:keyLabel=":O"
latin:keyOutputText=":O " />
<Key
latin:keyLabel="B-)"
latin:keyOutputText="B-) " />
<Key
latin:keyLabel=":-$"
latin:keyOutputText=":-$ " />
<Key
latin:keyLabel=":-!"
latin:keyOutputText=":-! "
latin:keyEdgeFlags="right" />
</Row>
<Row
latin:rowEdgeFlags="bottom"
>
<Key
latin:keyLabel=":-["
latin:keyOutputText=":-[ "
latin:keyEdgeFlags="left" />
<Key
latin:keyLabel="O:-)"
latin:keyOutputText="O:-) " />
<Key
latin:keyLabel=":-\\"
latin:keyOutputText=":-\\ " />
<Key
latin:keyLabel=":'("
latin:keyOutputText=":'( " />
<Key
latin:keyLabel=":-D"
latin:keyOutputText=":-D "
latin:keyEdgeFlags="right" />
</Row>
</Keyboard>

View File

@ -30,53 +30,43 @@
<Key <Key
latin:keyLabel="a" latin:keyLabel="a"
latin:keyHintIcon="@drawable/keyboard_hint_1" latin:keyHintIcon="@drawable/keyboard_hint_1"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_a" latin:popupCharacters="@string/alternates_for_a"
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<Key <Key
latin:keyLabel="z" latin:keyLabel="z"
latin:keyHintIcon="@drawable/keyboard_hint_2" latin:keyHintIcon="@drawable/keyboard_hint_2"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_z" /> latin:popupCharacters="@string/alternates_for_z" />
<Key <Key
latin:keyLabel="e" latin:keyLabel="e"
latin:keyHintIcon="@drawable/keyboard_hint_3" latin:keyHintIcon="@drawable/keyboard_hint_3"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_e" /> latin:popupCharacters="@string/alternates_for_e" />
<Key <Key
latin:keyLabel="r" latin:keyLabel="r"
latin:keyHintIcon="@drawable/keyboard_hint_4" latin:keyHintIcon="@drawable/keyboard_hint_4"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_r" /> latin:popupCharacters="@string/alternates_for_r" />
<Key <Key
latin:keyLabel="t" latin:keyLabel="t"
latin:keyHintIcon="@drawable/keyboard_hint_5" latin:keyHintIcon="@drawable/keyboard_hint_5"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_t" /> latin:popupCharacters="@string/alternates_for_t" />
<Key <Key
latin:keyLabel="y" latin:keyLabel="y"
latin:keyHintIcon="@drawable/keyboard_hint_6" latin:keyHintIcon="@drawable/keyboard_hint_6"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_y" /> latin:popupCharacters="@string/alternates_for_y" />
<Key <Key
latin:keyLabel="u" latin:keyLabel="u"
latin:keyHintIcon="@drawable/keyboard_hint_7" latin:keyHintIcon="@drawable/keyboard_hint_7"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_u" /> latin:popupCharacters="@string/alternates_for_u" />
<Key <Key
latin:keyLabel="i" latin:keyLabel="i"
latin:keyHintIcon="@drawable/keyboard_hint_8" latin:keyHintIcon="@drawable/keyboard_hint_8"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_i" /> latin:popupCharacters="@string/alternates_for_i" />
<Key <Key
latin:keyLabel="o" latin:keyLabel="o"
latin:keyHintIcon="@drawable/keyboard_hint_9" latin:keyHintIcon="@drawable/keyboard_hint_9"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_o" /> latin:popupCharacters="@string/alternates_for_o" />
<Key <Key
latin:keyLabel="p" latin:keyLabel="p"
latin:keyHintIcon="@drawable/keyboard_hint_0" latin:keyHintIcon="@drawable/keyboard_hint_0"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_p" latin:popupCharacters="@string/alternates_for_p"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
@ -85,22 +75,18 @@
> >
<Key <Key
latin:keyLabel="q" latin:keyLabel="q"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_q" latin:popupCharacters="@string/alternates_for_q"
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<Key <Key
latin:keyLabel="s" latin:keyLabel="s"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_s" /> latin:popupCharacters="@string/alternates_for_s" />
<Key <Key
latin:keyLabel="d" latin:keyLabel="d"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_d" /> latin:popupCharacters="@string/alternates_for_d" />
<Key <Key
latin:keyLabel="f" /> latin:keyLabel="f" />
<Key <Key
latin:keyLabel="g" latin:keyLabel="g"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_g" /> latin:popupCharacters="@string/alternates_for_g" />
<Key <Key
latin:keyLabel="h" /> latin:keyLabel="h" />
@ -110,7 +96,6 @@
latin:keyLabel="k" /> latin:keyLabel="k" />
<Key <Key
latin:keyLabel="l" latin:keyLabel="l"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_l" /> latin:popupCharacters="@string/alternates_for_l" />
<Key <Key
latin:keyLabel="m" latin:keyLabel="m"
@ -125,23 +110,20 @@
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<Key <Key
latin:keyLabel="w" latin:keyLabel="w"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_w" /> latin:popupCharacters="@string/alternates_for_w" />
<Key <Key
latin:keyLabel="x" /> latin:keyLabel="x" />
<Key <Key
latin:keyLabel="c" latin:keyLabel="c"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_c" /> latin:popupCharacters="@string/alternates_for_c" />
<Key <Key
latin:keyLabel="v" latin:keyLabel="v"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_v" /> latin:popupCharacters="@string/alternates_for_v" />
<Key <Key
latin:keyLabel="b" /> latin:keyLabel="b" />
<Key <Key
latin:keyLabel="n" latin:keyLabel="n"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_n" /> latin:popupCharacters="@string/alternates_for_n" />
<Key <Key
latin:keyLabel="\'" /> latin:keyLabel="\'" />

View File

@ -88,10 +88,10 @@
<key-style <key-style
latin:styleName="micKeyStyle" latin:styleName="micKeyStyle"
latin:codes="@integer/key_voice" latin:codes="@integer/key_voice"
latin:popupKeyboard="@xml/popup_mic"
latin:keyIcon="@drawable/sym_keyboard_mic" latin:keyIcon="@drawable/sym_keyboard_mic"
latin:iconPreview="@drawable/sym_keyboard_feedback_mic" latin:iconPreview="@drawable/sym_keyboard_feedback_mic"
latin:keyHintIcon="@drawable/hint_popup" latin:keyHintIcon="@drawable/hint_popup"
latin:popupCharacters="@string/alternates_for_mic"
latin:parentStyle="functionalKeyStyle" /> latin:parentStyle="functionalKeyStyle" />
<!-- Note: This key style is not for functional tab key. This is used for the tab key <!-- 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. --> which is laid out as normal letter key. -->
@ -165,10 +165,10 @@
<key-style <key-style
latin:styleName="micKeyStyle" latin:styleName="micKeyStyle"
latin:codes="@integer/key_voice" latin:codes="@integer/key_voice"
latin:popupKeyboard="@xml/popup_mic"
latin:keyIcon="@drawable/sym_bkeyboard_mic" latin:keyIcon="@drawable/sym_bkeyboard_mic"
latin:iconPreview="@drawable/sym_keyboard_feedback_mic" latin:iconPreview="@drawable/sym_keyboard_feedback_mic"
latin:keyHintIcon="@drawable/hint_popup" latin:keyHintIcon="@drawable/hint_popup"
latin:popupCharacters="@string/alternates_for_mic"
latin:parentStyle="functionalKeyStyle" /> latin:parentStyle="functionalKeyStyle" />
<!-- Note: This key style is not for functional tab key. This is used for the tab key <!-- 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. --> which is laid out as normal letter key. -->
@ -284,6 +284,7 @@
latin:keyLabel=":-)" latin:keyLabel=":-)"
latin:keyOutputText=":-) " latin:keyOutputText=":-) "
latin:keyHintIcon="@drawable/hint_popup" latin:keyHintIcon="@drawable/hint_popup"
latin:popupKeyboard="@xml/popup_smileys" latin:popupCharacters="@string/alternates_for_smiley"
latin:maxPopupKeyboardColumn="5"
latin:parentStyle="functionalKeyStyle" /> latin:parentStyle="functionalKeyStyle" />
</merge> </merge>

View File

@ -26,6 +26,8 @@
latin:keyWidth="26.67%p" latin:keyWidth="26.67%p"
latin:horizontalGap="@dimen/key_horizontal_gap" latin:horizontalGap="@dimen/key_horizontal_gap"
latin:verticalGap="@dimen/key_bottom_gap" latin:verticalGap="@dimen/key_bottom_gap"
latin:popupKeyboardTemplate="@xml/kbd_popup_template"
latin:maxPopupKeyboardColumn="@integer/config_max_popup_keyboard_column"
> >
<include <include
latin:keyboardLayout="@xml/kbd_key_styles" /> latin:keyboardLayout="@xml/kbd_key_styles" />

View File

@ -26,6 +26,8 @@
latin:keyWidth="26.67%p" latin:keyWidth="26.67%p"
latin:horizontalGap="@dimen/key_horizontal_gap" latin:horizontalGap="@dimen/key_horizontal_gap"
latin:verticalGap="@dimen/key_bottom_gap" latin:verticalGap="@dimen/key_bottom_gap"
latin:popupKeyboardTemplate="@xml/kbd_popup_template"
latin:maxPopupKeyboardColumn="@integer/config_max_popup_keyboard_column"
> >
<include <include
latin:keyboardLayout="@xml/kbd_key_styles" /> latin:keyboardLayout="@xml/kbd_key_styles" />

View File

@ -26,6 +26,8 @@
latin:keyWidth="26.67%p" latin:keyWidth="26.67%p"
latin:horizontalGap="@dimen/key_horizontal_gap" latin:horizontalGap="@dimen/key_horizontal_gap"
latin:verticalGap="@dimen/key_bottom_gap" latin:verticalGap="@dimen/key_bottom_gap"
latin:popupKeyboardTemplate="@xml/kbd_popup_template"
latin:maxPopupKeyboardColumn="@integer/config_max_popup_keyboard_column"
> >
<include <include
latin:keyboardLayout="@xml/kbd_key_styles" /> latin:keyboardLayout="@xml/kbd_key_styles" />

View File

@ -26,6 +26,8 @@
latin:keyWidth="10%p" latin:keyWidth="10%p"
latin:horizontalGap="@dimen/key_horizontal_gap" latin:horizontalGap="@dimen/key_horizontal_gap"
latin:verticalGap="@dimen/key_bottom_gap" latin:verticalGap="@dimen/key_bottom_gap"
latin:popupKeyboardTemplate="@xml/kbd_popup_template"
latin:maxPopupKeyboardColumn="@integer/config_max_popup_keyboard_column"
> >
<include <include
latin:keyboardLayout="@xml/kbd_qwerty_rows" /> latin:keyboardLayout="@xml/kbd_qwerty_rows" />

View File

@ -27,8 +27,8 @@
> >
<Key <Key
latin:keyLabel="/" latin:keyLabel="/"
latin:popupKeyboard="@xml/popup_slash"
latin:keyHintIcon="@drawable/hint_popup" latin:keyHintIcon="@drawable/hint_popup"
latin:popupCharacters="@string/alternates_for_settings_slash"
latin:isModifier="true" /> latin:isModifier="true" />
</case> </case>
<case <case
@ -36,8 +36,8 @@
> >
<Key <Key
latin:keyLabel="\@" latin:keyLabel="\@"
latin:popupKeyboard="@xml/popup_at"
latin:keyHintIcon="@drawable/hint_popup" latin:keyHintIcon="@drawable/hint_popup"
latin:popupCharacters="@string/alternates_for_settings_at"
latin:isModifier="true" /> latin:isModifier="true" />
</case> </case>
<default> <default>
@ -53,8 +53,8 @@
> >
<Key <Key
latin:keyLabel="," latin:keyLabel=","
latin:popupKeyboard="@xml/popup_comma"
latin:keyHintIcon="@drawable/hint_popup" latin:keyHintIcon="@drawable/hint_popup"
latin:popupCharacters="@string/alternates_for_settings_comma"
latin:isModifier="true" /> latin:isModifier="true" />
</case> </case>
</switch> </switch>

View File

@ -28,53 +28,43 @@
<Key <Key
latin:keyLabel="q" latin:keyLabel="q"
latin:keyHintIcon="@drawable/keyboard_hint_1" latin:keyHintIcon="@drawable/keyboard_hint_1"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_q" latin:popupCharacters="@string/alternates_for_q"
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<Key <Key
latin:keyLabel="w" latin:keyLabel="w"
latin:keyHintIcon="@drawable/keyboard_hint_2" latin:keyHintIcon="@drawable/keyboard_hint_2"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_w" /> latin:popupCharacters="@string/alternates_for_w" />
<Key <Key
latin:keyLabel="e" latin:keyLabel="e"
latin:keyHintIcon="@drawable/keyboard_hint_3" latin:keyHintIcon="@drawable/keyboard_hint_3"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_e" /> latin:popupCharacters="@string/alternates_for_e" />
<Key <Key
latin:keyLabel="r" latin:keyLabel="r"
latin:keyHintIcon="@drawable/keyboard_hint_4" latin:keyHintIcon="@drawable/keyboard_hint_4"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_r" /> latin:popupCharacters="@string/alternates_for_r" />
<Key <Key
latin:keyLabel="t" latin:keyLabel="t"
latin:keyHintIcon="@drawable/keyboard_hint_5" latin:keyHintIcon="@drawable/keyboard_hint_5"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_t" /> latin:popupCharacters="@string/alternates_for_t" />
<Key <Key
latin:keyLabel="y" latin:keyLabel="y"
latin:keyHintIcon="@drawable/keyboard_hint_6" latin:keyHintIcon="@drawable/keyboard_hint_6"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_y" /> latin:popupCharacters="@string/alternates_for_y" />
<Key <Key
latin:keyLabel="u" latin:keyLabel="u"
latin:keyHintIcon="@drawable/keyboard_hint_7" latin:keyHintIcon="@drawable/keyboard_hint_7"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_u" /> latin:popupCharacters="@string/alternates_for_u" />
<Key <Key
latin:keyLabel="i" latin:keyLabel="i"
latin:keyHintIcon="@drawable/keyboard_hint_8" latin:keyHintIcon="@drawable/keyboard_hint_8"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_i" /> latin:popupCharacters="@string/alternates_for_i" />
<Key <Key
latin:keyLabel="o" latin:keyLabel="o"
latin:keyHintIcon="@drawable/keyboard_hint_9" latin:keyHintIcon="@drawable/keyboard_hint_9"
latin:popupKeyboard="@xml/kbd_popup_narrow_template"
latin:popupCharacters="@string/alternates_for_o" /> latin:popupCharacters="@string/alternates_for_o" />
<Key <Key
latin:keyLabel="p" latin:keyLabel="p"
latin:keyHintIcon="@drawable/keyboard_hint_0" latin:keyHintIcon="@drawable/keyboard_hint_0"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_p" latin:popupCharacters="@string/alternates_for_p"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>

View File

@ -28,22 +28,18 @@
latin:horizontalGap="5%p" /> latin:horizontalGap="5%p" />
<Key <Key
latin:keyLabel="a" latin:keyLabel="a"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_a" latin:popupCharacters="@string/alternates_for_a"
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<Key <Key
latin:keyLabel="s" latin:keyLabel="s"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_s" /> latin:popupCharacters="@string/alternates_for_s" />
<Key <Key
latin:keyLabel="d" latin:keyLabel="d"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_d" /> latin:popupCharacters="@string/alternates_for_d" />
<Key <Key
latin:keyLabel="f" /> latin:keyLabel="f" />
<Key <Key
latin:keyLabel="g" latin:keyLabel="g"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_g" /> latin:popupCharacters="@string/alternates_for_g" />
<Key <Key
latin:keyLabel="h" /> latin:keyLabel="h" />
@ -53,7 +49,6 @@
latin:keyLabel="k" /> latin:keyLabel="k" />
<Key <Key
latin:keyLabel="l" latin:keyLabel="l"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_l" latin:popupCharacters="@string/alternates_for_l"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>

View File

@ -30,23 +30,19 @@
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<Key <Key
latin:keyLabel="z" latin:keyLabel="z"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_z" /> latin:popupCharacters="@string/alternates_for_z" />
<Key <Key
latin:keyLabel="x" /> latin:keyLabel="x" />
<Key <Key
latin:keyLabel="c" latin:keyLabel="c"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_c" /> latin:popupCharacters="@string/alternates_for_c" />
<Key <Key
latin:keyLabel="v" latin:keyLabel="v"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_v" /> latin:popupCharacters="@string/alternates_for_v" />
<Key <Key
latin:keyLabel="b" /> latin:keyLabel="b" />
<Key <Key
latin:keyLabel="n" latin:keyLabel="n"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_n" /> latin:popupCharacters="@string/alternates_for_n" />
<Key <Key
latin:keyLabel="m" /> latin:keyLabel="m" />

View File

@ -55,7 +55,8 @@
<Key <Key
latin:keyLabel="." latin:keyLabel="."
latin:keyHintIcon="@drawable/hint_popup" latin:keyHintIcon="@drawable/hint_popup"
latin:popupKeyboard="@xml/popup_punctuation" latin:popupCharacters="@string/alternates_for_punctuation"
latin:maxPopupKeyboardColumn="7"
latin:keyStyle="functionalKeyStyle" /> latin:keyStyle="functionalKeyStyle" />
<switch> <switch>
<case <case
@ -104,7 +105,8 @@
<Key <Key
latin:keyLabel="." latin:keyLabel="."
latin:keyHintIcon="@drawable/hint_popup" latin:keyHintIcon="@drawable/hint_popup"
latin:popupKeyboard="@xml/popup_punctuation" latin:popupCharacters="@string/alternates_for_punctuation"
latin:maxPopupKeyboardColumn="7"
latin:keyStyle="functionalKeyStyle" /> latin:keyStyle="functionalKeyStyle" />
<switch> <switch>
<case <case

View File

@ -30,54 +30,44 @@
<Key <Key
latin:keyLabel="q" latin:keyLabel="q"
latin:keyHintIcon="@drawable/keyboard_hint_1" latin:keyHintIcon="@drawable/keyboard_hint_1"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_q" latin:popupCharacters="@string/alternates_for_q"
latin:keyWidth="8.75%p" latin:keyWidth="8.75%p"
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<Key <Key
latin:keyLabel="w" latin:keyLabel="w"
latin:keyHintIcon="@drawable/keyboard_hint_2" latin:keyHintIcon="@drawable/keyboard_hint_2"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_w" /> latin:popupCharacters="@string/alternates_for_w" />
<Key <Key
latin:keyLabel="e" latin:keyLabel="e"
latin:keyHintIcon="@drawable/keyboard_hint_3" latin:keyHintIcon="@drawable/keyboard_hint_3"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_e" /> latin:popupCharacters="@string/alternates_for_e" />
<Key <Key
latin:keyLabel="r" latin:keyLabel="r"
latin:keyHintIcon="@drawable/keyboard_hint_4" latin:keyHintIcon="@drawable/keyboard_hint_4"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_r" /> latin:popupCharacters="@string/alternates_for_r" />
<Key <Key
latin:keyLabel="t" latin:keyLabel="t"
latin:keyHintIcon="@drawable/keyboard_hint_5" latin:keyHintIcon="@drawable/keyboard_hint_5"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_t" /> latin:popupCharacters="@string/alternates_for_t" />
<Key <Key
latin:keyLabel="y" latin:keyLabel="y"
latin:keyHintIcon="@drawable/keyboard_hint_6" latin:keyHintIcon="@drawable/keyboard_hint_6"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_y" /> latin:popupCharacters="@string/alternates_for_y" />
<Key <Key
latin:keyLabel="u" latin:keyLabel="u"
latin:keyHintIcon="@drawable/keyboard_hint_7" latin:keyHintIcon="@drawable/keyboard_hint_7"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_u" /> latin:popupCharacters="@string/alternates_for_u" />
<Key <Key
latin:keyLabel="i" latin:keyLabel="i"
latin:keyHintIcon="@drawable/keyboard_hint_8" latin:keyHintIcon="@drawable/keyboard_hint_8"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_i" /> latin:popupCharacters="@string/alternates_for_i" />
<Key <Key
latin:keyLabel="o" latin:keyLabel="o"
latin:keyHintIcon="@drawable/keyboard_hint_9" latin:keyHintIcon="@drawable/keyboard_hint_9"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_o" /> latin:popupCharacters="@string/alternates_for_o" />
<Key <Key
latin:keyLabel="p" latin:keyLabel="p"
latin:keyHintIcon="@drawable/keyboard_hint_0" latin:keyHintIcon="@drawable/keyboard_hint_0"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_p" /> latin:popupCharacters="@string/alternates_for_p" />
<Key <Key
latin:keyLabel="å" latin:keyLabel="å"
@ -89,23 +79,19 @@
> >
<Key <Key
latin:keyLabel="a" latin:keyLabel="a"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_a" latin:popupCharacters="@string/alternates_for_a"
latin:keyWidth="8.75%p" latin:keyWidth="8.75%p"
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<Key <Key
latin:keyLabel="s" latin:keyLabel="s"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_s" /> latin:popupCharacters="@string/alternates_for_s" />
<Key <Key
latin:keyLabel="d" latin:keyLabel="d"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_d" /> latin:popupCharacters="@string/alternates_for_d" />
<Key <Key
latin:keyLabel="f" /> latin:keyLabel="f" />
<Key <Key
latin:keyLabel="g" latin:keyLabel="g"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_g" /> latin:popupCharacters="@string/alternates_for_g" />
<Key <Key
latin:keyLabel="h" /> latin:keyLabel="h" />
@ -115,15 +101,12 @@
latin:keyLabel="k" /> latin:keyLabel="k" />
<Key <Key
latin:keyLabel="l" latin:keyLabel="l"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_l" /> latin:popupCharacters="@string/alternates_for_l" />
<Key <Key
latin:keyLabel="@string/keylabel_for_scandinavia_row2_10" latin:keyLabel="@string/keylabel_for_scandinavia_row2_10"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_scandinavia_row2_10" /> latin:popupCharacters="@string/alternates_for_scandinavia_row2_10" />
<Key <Key
latin:keyLabel="@string/keylabel_for_scandinavia_row2_11" latin:keyLabel="@string/keylabel_for_scandinavia_row2_11"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_scandinavia_row2_11" latin:popupCharacters="@string/alternates_for_scandinavia_row2_11"
latin:keyWidth="8.75%p" latin:keyWidth="8.75%p"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />

View File

@ -30,53 +30,43 @@
<Key <Key
latin:keyLabel="q" latin:keyLabel="q"
latin:keyHintIcon="@drawable/keyboard_hint_1" latin:keyHintIcon="@drawable/keyboard_hint_1"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_q" latin:popupCharacters="@string/alternates_for_q"
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<Key <Key
latin:keyLabel="w" latin:keyLabel="w"
latin:keyHintIcon="@drawable/keyboard_hint_2" latin:keyHintIcon="@drawable/keyboard_hint_2"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_w" /> latin:popupCharacters="@string/alternates_for_w" />
<Key <Key
latin:keyLabel="e" latin:keyLabel="e"
latin:keyHintIcon="@drawable/keyboard_hint_3" latin:keyHintIcon="@drawable/keyboard_hint_3"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_e" /> latin:popupCharacters="@string/alternates_for_e" />
<Key <Key
latin:keyLabel="r" latin:keyLabel="r"
latin:keyHintIcon="@drawable/keyboard_hint_4" latin:keyHintIcon="@drawable/keyboard_hint_4"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_r" /> latin:popupCharacters="@string/alternates_for_r" />
<Key <Key
latin:keyLabel="t" latin:keyLabel="t"
latin:keyHintIcon="@drawable/keyboard_hint_5" latin:keyHintIcon="@drawable/keyboard_hint_5"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_t" /> latin:popupCharacters="@string/alternates_for_t" />
<Key <Key
latin:keyLabel="z" latin:keyLabel="z"
latin:keyHintIcon="@drawable/keyboard_hint_6" latin:keyHintIcon="@drawable/keyboard_hint_6"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_z" /> latin:popupCharacters="@string/alternates_for_z" />
<Key <Key
latin:keyLabel="u" latin:keyLabel="u"
latin:keyHintIcon="@drawable/keyboard_hint_7" latin:keyHintIcon="@drawable/keyboard_hint_7"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_u" /> latin:popupCharacters="@string/alternates_for_u" />
<Key <Key
latin:keyLabel="i" latin:keyLabel="i"
latin:keyHintIcon="@drawable/keyboard_hint_8" latin:keyHintIcon="@drawable/keyboard_hint_8"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_i" /> latin:popupCharacters="@string/alternates_for_i" />
<Key <Key
latin:keyLabel="o" latin:keyLabel="o"
latin:keyHintIcon="@drawable/keyboard_hint_9" latin:keyHintIcon="@drawable/keyboard_hint_9"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_o" /> latin:popupCharacters="@string/alternates_for_o" />
<Key <Key
latin:keyLabel="p" latin:keyLabel="p"
latin:keyHintIcon="@drawable/keyboard_hint_0" latin:keyHintIcon="@drawable/keyboard_hint_0"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_p" latin:popupCharacters="@string/alternates_for_p"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
@ -91,23 +81,19 @@
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<Key <Key
latin:keyLabel="y" latin:keyLabel="y"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_y" /> latin:popupCharacters="@string/alternates_for_y" />
<Key <Key
latin:keyLabel="x" /> latin:keyLabel="x" />
<Key <Key
latin:keyLabel="c" latin:keyLabel="c"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_c" /> latin:popupCharacters="@string/alternates_for_c" />
<Key <Key
latin:keyLabel="v" latin:keyLabel="v"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_v" /> latin:popupCharacters="@string/alternates_for_v" />
<Key <Key
latin:keyLabel="b" /> latin:keyLabel="b" />
<Key <Key
latin:keyLabel="n" latin:keyLabel="n"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="@string/alternates_for_n" /> latin:popupCharacters="@string/alternates_for_n" />
<Key <Key
latin:keyLabel="m" /> latin:keyLabel="m" />

View File

@ -26,6 +26,8 @@
latin:keyWidth="10%p" latin:keyWidth="10%p"
latin:horizontalGap="@dimen/key_horizontal_gap" latin:horizontalGap="@dimen/key_horizontal_gap"
latin:verticalGap="@dimen/key_bottom_gap" latin:verticalGap="@dimen/key_bottom_gap"
latin:popupKeyboardTemplate="@xml/kbd_popup_template"
latin:maxPopupKeyboardColumn="@integer/config_max_popup_keyboard_column"
> >
<include <include
latin:keyboardLayout="@xml/kbd_key_styles" /> latin:keyboardLayout="@xml/kbd_key_styles" />
@ -34,30 +36,24 @@
> >
<Key <Key
latin:keyLabel="1" latin:keyLabel="1"
latin:popupKeyboard="@xml/kbd_popup_template" latin:popupCharacters="¹,½,⅓,¼,⅛"
latin:popupCharacters="¹½⅓¼⅛"
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<Key <Key
latin:keyLabel="2" latin:keyLabel="2"
latin:popupKeyboard="@xml/kbd_popup_template" latin:popupCharacters="²,⅔" />
latin:popupCharacters="²⅔" />
<Key <Key
latin:keyLabel="3" latin:keyLabel="3"
latin:popupKeyboard="@xml/kbd_popup_template" latin:popupCharacters="³,¾,⅜" />
latin:popupCharacters="³¾⅜" />
<Key <Key
latin:keyLabel="4" latin:keyLabel="4"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="⁴" /> latin:popupCharacters="⁴" />
<Key <Key
latin:keyLabel="5" latin:keyLabel="5"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="⅝" /> latin:popupCharacters="⅝" />
<Key <Key
latin:keyLabel="6" /> latin:keyLabel="6" />
<Key <Key
latin:keyLabel="7" latin:keyLabel="7"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="⅞" /> latin:popupCharacters="⅞" />
<Key <Key
latin:keyLabel="8" /> latin:keyLabel="8" />
@ -65,8 +61,7 @@
latin:keyLabel="9" /> latin:keyLabel="9" />
<Key <Key
latin:keyLabel="0" latin:keyLabel="0"
latin:popupKeyboard="@xml/kbd_popup_template" latin:popupCharacters="ⁿ,∅"
latin:popupCharacters="ⁿ∅"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<Row> <Row>
@ -77,34 +72,27 @@
latin:keyLabel="\#" /> latin:keyLabel="\#" />
<Key <Key
latin:keyLabel="$" latin:keyLabel="$"
latin:popupKeyboard="@xml/kbd_popup_template" latin:popupCharacters="¢,£,€,¥,₣,₤,₱" />
latin:popupCharacters="¢£€¥₣₤₱" />
<Key <Key
latin:keyLabel="%" latin:keyLabel="%"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="‰" /> latin:popupCharacters="‰" />
<Key <Key
latin:keyLabel="&amp;" /> latin:keyLabel="&amp;" />
<Key <Key
latin:keyLabel="*" latin:keyLabel="*"
latin:popupKeyboard="@xml/kbd_popup_template" latin:popupCharacters="†,‡,★" />
latin:popupCharacters="†‡★" />
<Key <Key
latin:keyLabel="-" latin:keyLabel="-"
latin:popupKeyboard="@xml/kbd_popup_template" latin:popupCharacters="_,,—" />
latin:popupCharacters="_—" />
<Key <Key
latin:keyLabel="+" latin:keyLabel="+"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="±" /> latin:popupCharacters="±" />
<Key <Key
latin:keyLabel="(" latin:keyLabel="("
latin:popupKeyboard="@xml/kbd_popup_template" latin:popupCharacters="[,{,&lt;" />
latin:popupCharacters="[{&lt;" />
<Key <Key
latin:keyLabel=")" latin:keyLabel=")"
latin:popupKeyboard="@xml/kbd_popup_template" latin:popupCharacters="],},&gt;"
latin:popupCharacters="]}&gt;"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<Row> <Row>
@ -114,16 +102,13 @@
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<Key <Key
latin:keyLabel="!" latin:keyLabel="!"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="¡" /> latin:popupCharacters="¡" />
<Key <Key
latin:keyLabel="&quot;" latin:keyLabel="&quot;"
latin:popupKeyboard="@xml/kbd_popup_template" latin:popupCharacters="“,”,«,»,˝" />
latin:popupCharacters="“”«»˝" />
<Key <Key
latin:keyLabel="\'" latin:keyLabel="\'"
latin:popupKeyboard="@xml/kbd_popup_template" latin:popupCharacters="," />
latin:popupCharacters="" />
<Key <Key
latin:keyLabel=":" /> latin:keyLabel=":" />
<Key <Key
@ -132,7 +117,6 @@
latin:keyLabel="/" /> latin:keyLabel="/" />
<Key <Key
latin:keyLabel="\?" latin:keyLabel="\?"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="¿" /> latin:popupCharacters="¿" />
<Key <Key
latin:keyStyle="deleteKeyStyle" latin:keyStyle="deleteKeyStyle"

View File

@ -33,8 +33,8 @@
> >
<Key <Key
latin:keyLabel="," latin:keyLabel=","
latin:popupKeyboard="@xml/popup_comma"
latin:keyHintIcon="@drawable/hint_popup" latin:keyHintIcon="@drawable/hint_popup"
latin:popupCharacters="@string/alternates_for_settings_comma"
latin:keyStyle="functionalKeyStyle" /> latin:keyStyle="functionalKeyStyle" />
</case> </case>
</switch> </switch>

View File

@ -40,7 +40,8 @@
<Key <Key
latin:keyLabel="." latin:keyLabel="."
latin:keyHintIcon="@drawable/hint_popup" latin:keyHintIcon="@drawable/hint_popup"
latin:popupKeyboard="@xml/popup_punctuation" latin:popupCharacters="@string/alternates_for_punctuation"
latin:maxPopupKeyboardColumn="7"
latin:keyStyle="functionalKeyStyle" /> latin:keyStyle="functionalKeyStyle" />
<switch> <switch>
<case <case
@ -76,7 +77,8 @@
<Key <Key
latin:keyLabel="." latin:keyLabel="."
latin:keyHintIcon="@drawable/hint_popup" latin:keyHintIcon="@drawable/hint_popup"
latin:popupKeyboard="@xml/popup_punctuation" latin:popupCharacters="@string/alternates_for_punctuation"
latin:maxPopupKeyboardColumn="7"
latin:keyStyle="functionalKeyStyle" /> latin:keyStyle="functionalKeyStyle" />
<switch> <switch>
<case <case

View File

@ -26,6 +26,8 @@
latin:keyWidth="10%p" latin:keyWidth="10%p"
latin:horizontalGap="@dimen/key_horizontal_gap" latin:horizontalGap="@dimen/key_horizontal_gap"
latin:verticalGap="@dimen/key_bottom_gap" latin:verticalGap="@dimen/key_bottom_gap"
latin:popupKeyboardTemplate="@xml/kbd_popup_template"
latin:maxPopupKeyboardColumn="@integer/config_max_popup_keyboard_column"
> >
<include <include
latin:keyboardLayout="@xml/kbd_key_styles" /> latin:keyboardLayout="@xml/kbd_key_styles" />
@ -41,13 +43,11 @@
latin:keyLabel="|" /> latin:keyLabel="|" />
<Key <Key
latin:keyLabel="•" latin:keyLabel="•"
latin:popupKeyboard="@xml/kbd_popup_template" latin:popupCharacters="♪,♥,♠,♦,♣" />
latin:popupCharacters="♪♥♠♦♣" />
<Key <Key
latin:keyLabel="√" /> latin:keyLabel="√" />
<Key <Key
latin:keyLabel="π" latin:keyLabel="π"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="Π" /> latin:popupCharacters="Π" />
<Key <Key
latin:keyLabel="÷" /> latin:keyLabel="÷" />
@ -73,14 +73,12 @@
latin:keyLabel="°" /> latin:keyLabel="°" />
<Key <Key
latin:keyLabel="^" latin:keyLabel="^"
latin:popupKeyboard="@xml/kbd_popup_template" latin:popupCharacters="↑,↓,←,→" />
latin:popupCharacters="↑↓←→" />
<Key <Key
latin:keyLabel="_" /> latin:keyLabel="_" />
<Key <Key
latin:keyLabel="=" latin:keyLabel="="
latin:popupKeyboard="@xml/kbd_popup_template" latin:popupCharacters="≠,≈,∞" />
latin:popupCharacters="≠≈∞" />
<Key <Key
latin:keyLabel="[" /> latin:keyLabel="[" />
<Key <Key
@ -100,18 +98,15 @@
latin:keyLabel="©" /> latin:keyLabel="©" />
<Key <Key
latin:keyLabel="¶" latin:keyLabel="¶"
latin:popupKeyboard="@xml/kbd_popup_template"
latin:popupCharacters="§" /> latin:popupCharacters="§" />
<Key <Key
latin:keyLabel="\\" /> latin:keyLabel="\\" />
<Key <Key
latin:keyLabel="&lt;" latin:keyLabel="&lt;"
latin:popupKeyboard="@xml/kbd_popup_template" latin:popupCharacters="≤,«," />
latin:popupCharacters="≤«‹" />
<Key <Key
latin:keyLabel="&gt;" latin:keyLabel="&gt;"
latin:popupKeyboard="@xml/kbd_popup_template" latin:popupCharacters="≥,»," />
latin:popupCharacters="≥»›" />
<Key <Key
latin:keyStyle="deleteKeyStyle" latin:keyStyle="deleteKeyStyle"
latin:keyWidth="15%p" latin:keyWidth="15%p"

View File

@ -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:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
latin:keyWidth="10%p"
latin:horizontalGap="0px"
latin:verticalGap="0px"
latin:rowHeight="@dimen/popup_key_height"
>
<Row
latin:rowEdgeFlags="top|bottom"
>
<Key
latin:codes="@integer/key_settings"
latin:keyIcon="@drawable/sym_keyboard_settings"
latin:keyEdgeFlags="left" />
<Key
latin:keyLabel="\@"
latin:keyEdgeFlags="right" />
</Row>
</Keyboard>

View File

@ -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:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
latin:keyWidth="10%p"
latin:horizontalGap="0px"
latin:verticalGap="0px"
latin:rowHeight="@dimen/popup_key_height"
>
<Row
latin:rowEdgeFlags="top|bottom"
>
<Key
latin:codes="@integer/key_settings"
latin:keyIcon="@drawable/sym_keyboard_settings"
latin:keyEdgeFlags="left" />
<Key
latin:keyLabel=","
latin:keyEdgeFlags="right" />
</Row>
</Keyboard>

View File

@ -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:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
latin:keyWidth="15%p"
latin:horizontalGap="0px"
latin:verticalGap="0px"
latin:rowHeight="@dimen/popup_key_height"
>
<Row
latin:rowEdgeFlags="top|bottom"
>
<Key
latin:keyLabel="@string/popular_domain_1"
latin:keyOutputText="@string/popular_domain_1"
latin:keyEdgeFlags="left" />
<Key
latin:keyLabel="@string/popular_domain_2"
latin:keyOutputText="@string/popular_domain_2" />
<Key
latin:keyLabel="@string/popular_domain_3"
latin:keyOutputText="@string/popular_domain_3" />
<Key
latin:keyLabel="@string/popular_domain_4"
latin:keyOutputText="@string/popular_domain_4"
latin:keyEdgeFlags="right" />
</Row>
</Keyboard>

View File

@ -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:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
latin:keyWidth="10%p"
latin:horizontalGap="0px"
latin:verticalGap="0px"
latin:rowHeight="@dimen/popup_key_height"
>
<Row
latin:rowEdgeFlags="top|bottom"
>
<Key
latin:codes="@integer/key_settings"
latin:keyIcon="@drawable/sym_keyboard_settings"
latin:keyEdgeFlags="left" />
<Key
latin:codes="@integer/key_voice"
latin:keyIcon="@drawable/sym_keyboard_mic"
latin:keyEdgeFlags="right" />
</Row>
</Keyboard>

View File

@ -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:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
latin:keyWidth="10%p"
latin:horizontalGap="0px"
latin:verticalGap="0px"
latin:rowHeight="@dimen/popup_key_height"
>
<Row
latin:rowEdgeFlags="top"
>
<Key
latin:keyLabel=":"
latin:keyEdgeFlags="left" />
<Key
latin:keyLabel="/" />
<Key
latin:keyLabel="&amp;" />
<Key
latin:keyLabel="(" />
<Key
latin:keyLabel=")" />
<Key
latin:keyLabel="-" />
<Key
latin:keyLabel="+"
latin:keyEdgeFlags="right" />
</Row>
<Row
latin:rowEdgeFlags="bottom"
>
<Key
latin:keyLabel=";"
latin:keyEdgeFlags="left" />
<Key
latin:keyLabel="\@" />
<Key
latin:keyLabel="\'" />
<Key
latin:keyLabel="&quot;" />
<Key
latin:keyLabel="\?" />
<Key
latin:keyLabel="!" />
<Key
latin:keyLabel=","
latin:keyEdgeFlags="right" />
</Row>
</Keyboard>

View File

@ -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:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
latin:keyWidth="10%p"
latin:horizontalGap="0px"
latin:verticalGap="0px"
latin:rowHeight="@dimen/popup_key_height"
>
<Row
latin:rowEdgeFlags="top|bottom"
>
<Key
latin:codes="@integer/key_settings"
latin:keyIcon="@drawable/sym_keyboard_settings"
latin:keyEdgeFlags="left" />
<Key
latin:keyLabel="/"
latin:keyEdgeFlags="right" />
</Row>
</Keyboard>

View File

@ -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:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
latin:keyWidth="15%p"
latin:horizontalGap="0px"
latin:verticalGap="0px"
latin:rowHeight="@dimen/popup_key_height"
>
<Row
latin:rowEdgeFlags="top"
>
<Key
latin:keyLabel=":-)"
latin:keyOutputText=":-) "
latin:keyEdgeFlags="left" />
<Key
latin:keyLabel=":-("
latin:keyOutputText=":-( " />
<Key
latin:keyLabel=";-)"
latin:keyOutputText=";-) " />
<Key
latin:keyLabel=":-P"
latin:keyOutputText=":-P " />
<Key
latin:keyLabel="=-O"
latin:keyOutputText="=-O "
latin:keyEdgeFlags="right" />
</Row>
<Row>
<Key
latin:keyLabel=":-*"
latin:keyOutputText=":-* "
latin:keyEdgeFlags="left" />
<Key
latin:keyLabel=":O"
latin:keyOutputText=":O " />
<Key
latin:keyLabel="B-)"
latin:keyOutputText="B-) " />
<Key
latin:keyLabel=":-$"
latin:keyOutputText=":-$ " />
<Key
latin:keyLabel=":-!"
latin:keyOutputText=":-! "
latin:keyEdgeFlags="right" />
</Row>
<Row
latin:rowEdgeFlags="bottom"
>
<Key
latin:keyLabel=":-["
latin:keyOutputText=":-[ "
latin:keyEdgeFlags="left" />
<Key
latin:keyLabel="O:-)"
latin:keyOutputText="O:-) " />
<Key
latin:keyLabel=":-\\"
latin:keyOutputText=":-\\ " />
<Key
latin:keyLabel=":'("
latin:keyOutputText=":'( " />
<Key
latin:keyLabel=":-D"
latin:keyOutputText=":-D "
latin:keyEdgeFlags="right" />
</Row>
</Keyboard>

View File

@ -34,7 +34,7 @@
android:key="popup_on" android:key="popup_on"
android:title="@string/popup_on_keypress" android:title="@string/popup_on_keypress"
android:persistent="true" android:persistent="true"
android:defaultValue="@bool/default_popup_preview" android:defaultValue="@bool/config_default_popup_preview"
/> />
<CheckBoxPreference <CheckBoxPreference

View File

@ -16,8 +16,8 @@
package com.android.inputmethod.keyboard; package com.android.inputmethod.keyboard;
import com.android.inputmethod.keyboard.KeyboardParser.ParseException;
import com.android.inputmethod.keyboard.KeyStyles.KeyStyle; import com.android.inputmethod.keyboard.KeyStyles.KeyStyle;
import com.android.inputmethod.keyboard.KeyboardParser.ParseException;
import com.android.inputmethod.latin.R; import com.android.inputmethod.latin.R;
import android.content.res.Resources; import android.content.res.Resources;
@ -71,12 +71,9 @@ public class Key {
/** Text to output when pressed. This can be multiple characters, like ".com" */ /** Text to output when pressed. This can be multiple characters, like ".com" */
public final CharSequence mOutputText; public final CharSequence mOutputText;
/** Popup characters */ /** Popup characters */
public final CharSequence mPopupCharacters; public final CharSequence[] mPopupCharacters;
/** /** Popup keyboard maximum column number */
* If this key pops up a mini keyboard, this is the resource id for the XML layout for that public final int mMaxPopupColumn;
* keyboard.
*/
public final int mPopupResId;
/** /**
* Flags that specify the anchoring to edges of the keyboard for detecting touch events * Flags that specify the anchoring to edges of the keyboard for detecting touch events
@ -136,8 +133,13 @@ public class Key {
android.R.attr.state_pressed android.R.attr.state_pressed
}; };
/** Create an empty key with no attributes. */ private static final int[] DUMMY_CODES = { 0 };
public Key(Row row, char letter, int x, int y) {
/**
* Create an empty key with no attributes.
* This constructor is being used only for key in mini popup keyboard.
*/
public Key(Resources res, Row row, CharSequence popupCharacter, int x, int y) {
mKeyboard = row.getKeyboard(); mKeyboard = row.getKeyboard();
mHeight = row.mDefaultHeight - row.mVerticalGap; mHeight = row.mDefaultHeight - row.mVerticalGap;
mGap = row.mDefaultHorizontalGap; mGap = row.mDefaultHorizontalGap;
@ -150,18 +152,21 @@ public class Key {
mModifier = false; mModifier = false;
mSticky = false; mSticky = false;
mRepeatable = false; mRepeatable = false;
mOutputText = null;
mPopupCharacters = null; mPopupCharacters = null;
mPopupResId = 0; mMaxPopupColumn = 0;
mLabel = String.valueOf(letter); final String popupSpecification = popupCharacter.toString();
mCodes = new int[] { letter }; mLabel = PopupCharactersParser.getLabel(popupSpecification);
mOutputText = PopupCharactersParser.getOutputText(popupSpecification);
mCodes = PopupCharactersParser.getCodes(res, popupSpecification);
mIcon = PopupCharactersParser.getIcon(res, popupSpecification);
// Horizontal gap is divided equally to both sides of the key. // Horizontal gap is divided equally to both sides of the key.
mX = x + mGap / 2; mX = x + mGap / 2;
mY = y; mY = y;
} }
/** Create a key with the given top-left coordinate and extract its attributes from /**
* the XML parser. * Create a key with the given top-left coordinate and extract its attributes from the XML
* parser.
* @param res resources associated with the caller's context * @param res resources associated with the caller's context
* @param row the row that this key belongs to. The row must already be attached to * @param row the row that this key belongs to. The row must already be attached to
* a {@link Keyboard}. * a {@link Keyboard}.
@ -173,24 +178,32 @@ public class Key {
KeyStyles keyStyles) { KeyStyles keyStyles) {
mKeyboard = row.getKeyboard(); mKeyboard = row.getKeyboard();
TypedArray a = res.obtainAttributes(Xml.asAttributeSet(parser), final TypedArray keyboardAttr = res.obtainAttributes(Xml.asAttributeSet(parser),
R.styleable.Keyboard); R.styleable.Keyboard);
mHeight = KeyboardParser.getDimensionOrFraction(a, try {
mHeight = KeyboardParser.getDimensionOrFraction(keyboardAttr,
R.styleable.Keyboard_rowHeight, R.styleable.Keyboard_rowHeight,
mKeyboard.getKeyboardHeight(), row.mDefaultHeight) - row.mVerticalGap; mKeyboard.getKeyboardHeight(), row.mDefaultHeight) - row.mVerticalGap;
mGap = KeyboardParser.getDimensionOrFraction(a, mGap = KeyboardParser.getDimensionOrFraction(keyboardAttr,
R.styleable.Keyboard_horizontalGap, R.styleable.Keyboard_horizontalGap,
mKeyboard.getDisplayWidth(), row.mDefaultHorizontalGap); mKeyboard.getDisplayWidth(), row.mDefaultHorizontalGap);
mWidth = KeyboardParser.getDimensionOrFraction(a, mWidth = KeyboardParser.getDimensionOrFraction(keyboardAttr,
R.styleable.Keyboard_keyWidth, R.styleable.Keyboard_keyWidth,
mKeyboard.getDisplayWidth(), row.mDefaultWidth) - mGap; mKeyboard.getDisplayWidth(), row.mDefaultWidth) - mGap;
a.recycle(); } finally {
keyboardAttr.recycle();
}
a = res.obtainAttributes(Xml.asAttributeSet(parser), R.styleable.Keyboard_Key); // Horizontal gap is divided equally to both sides of the key.
this.mX = x + mGap / 2;
this.mY = y;
final TypedArray keyAttr = res.obtainAttributes(Xml.asAttributeSet(parser),
R.styleable.Keyboard_Key);
try {
final KeyStyle style; final KeyStyle style;
if (a.hasValue(R.styleable.Keyboard_Key_keyStyle)) { if (keyAttr.hasValue(R.styleable.Keyboard_Key_keyStyle)) {
String styleName = a.getString(R.styleable.Keyboard_Key_keyStyle); String styleName = keyAttr.getString(R.styleable.Keyboard_Key_keyStyle);
style = keyStyles.getKeyStyle(styleName); style = keyStyles.getKeyStyle(styleName);
if (style == null) if (style == null)
throw new ParseException("Unknown key style: " + styleName, parser); throw new ParseException("Unknown key style: " + styleName, parser);
@ -198,58 +211,51 @@ public class Key {
style = keyStyles.getEmptyKeyStyle(); style = keyStyles.getEmptyKeyStyle();
} }
// Horizontal gap is divided equally to both sides of the key. mPopupCharacters = style.getTextArray(keyAttr,
this.mX = x + mGap / 2;
this.mY = y;
final CharSequence popupCharacters = style.getText(a,
R.styleable.Keyboard_Key_popupCharacters); R.styleable.Keyboard_Key_popupCharacters);
final int popupResId = style.getResourceId(a, R.styleable.Keyboard_Key_popupKeyboard, 0); mMaxPopupColumn = style.getInt(keyboardAttr,
// We should not display mini keyboard when both popupResId and popupCharacters are R.styleable.Keyboard_Key_maxPopupKeyboardColumn,
// specified but popupCharacters is empty string. mKeyboard.getMaxPopupKeyboardColumn());
if (popupResId != 0 && popupCharacters != null && popupCharacters.length() == 0) {
mPopupResId = 0;
mPopupCharacters = null;
} else {
mPopupResId = popupResId;
mPopupCharacters = popupCharacters;
}
mRepeatable = style.getBoolean(a, R.styleable.Keyboard_Key_isRepeatable, false); mRepeatable = style.getBoolean(keyAttr, R.styleable.Keyboard_Key_isRepeatable, false);
mModifier = style.getBoolean(a, R.styleable.Keyboard_Key_isModifier, false); mModifier = style.getBoolean(keyAttr, R.styleable.Keyboard_Key_isModifier, false);
mSticky = style.getBoolean(a, R.styleable.Keyboard_Key_isSticky, false); mSticky = style.getBoolean(keyAttr, R.styleable.Keyboard_Key_isSticky, false);
mEdgeFlags = style.getFlag(a, R.styleable.Keyboard_Key_keyEdgeFlags, 0) mEdgeFlags = style.getFlag(keyAttr, R.styleable.Keyboard_Key_keyEdgeFlags, 0)
| row.mRowEdgeFlags; | row.mRowEdgeFlags;
mPreviewIcon = style.getDrawable(a, R.styleable.Keyboard_Key_iconPreview); mPreviewIcon = style.getDrawable(keyAttr, R.styleable.Keyboard_Key_iconPreview);
Keyboard.setDefaultBounds(mPreviewIcon); Keyboard.setDefaultBounds(mPreviewIcon);
mIcon = style.getDrawable(a, R.styleable.Keyboard_Key_keyIcon); mIcon = style.getDrawable(keyAttr, R.styleable.Keyboard_Key_keyIcon);
Keyboard.setDefaultBounds(mIcon); Keyboard.setDefaultBounds(mIcon);
mHintIcon = style.getDrawable(a, R.styleable.Keyboard_Key_keyHintIcon); mHintIcon = style.getDrawable(keyAttr, R.styleable.Keyboard_Key_keyHintIcon);
Keyboard.setDefaultBounds(mHintIcon); Keyboard.setDefaultBounds(mHintIcon);
mManualTemporaryUpperCaseHintIcon = style.getDrawable(a, mManualTemporaryUpperCaseHintIcon = style.getDrawable(keyAttr,
R.styleable.Keyboard_Key_manualTemporaryUpperCaseHintIcon); R.styleable.Keyboard_Key_manualTemporaryUpperCaseHintIcon);
Keyboard.setDefaultBounds(mManualTemporaryUpperCaseHintIcon); Keyboard.setDefaultBounds(mManualTemporaryUpperCaseHintIcon);
mLabel = style.getText(a, R.styleable.Keyboard_Key_keyLabel); mLabel = style.getText(keyAttr, R.styleable.Keyboard_Key_keyLabel);
mLabelOption = style.getFlag(a, R.styleable.Keyboard_Key_keyLabelOption, 0); mLabelOption = style.getFlag(keyAttr, R.styleable.Keyboard_Key_keyLabelOption, 0);
mManualTemporaryUpperCaseCode = style.getInt(a, mManualTemporaryUpperCaseCode = style.getInt(keyAttr,
R.styleable.Keyboard_Key_manualTemporaryUpperCaseCode, 0); R.styleable.Keyboard_Key_manualTemporaryUpperCaseCode, 0);
mOutputText = style.getText(a, R.styleable.Keyboard_Key_keyOutputText); mOutputText = style.getText(keyAttr, R.styleable.Keyboard_Key_keyOutputText);
// Choose the first letter of the label as primary code if not specified. // Choose the first letter of the label as primary code if not
final int[] codes = style.getIntArray(a, R.styleable.Keyboard_Key_codes); // specified.
final int[] codes = style.getIntArray(keyAttr, R.styleable.Keyboard_Key_codes);
if (codes == null && !TextUtils.isEmpty(mLabel)) { if (codes == null && !TextUtils.isEmpty(mLabel)) {
mCodes = new int[] { mLabel.charAt(0) }; mCodes = new int[] { mLabel.charAt(0) };
} else { } else if (codes != null) {
mCodes = codes; mCodes = codes;
} else {
mCodes = DUMMY_CODES;
} }
final Drawable shiftedIcon = style.getDrawable(a, final Drawable shiftedIcon = style.getDrawable(keyAttr,
R.styleable.Keyboard_Key_shiftedIcon); R.styleable.Keyboard_Key_shiftedIcon);
if (shiftedIcon != null) if (shiftedIcon != null)
mKeyboard.getShiftedIcons().put(this, shiftedIcon); mKeyboard.getShiftedIcons().put(this, shiftedIcon);
} finally {
a.recycle(); keyAttr.recycle();
}
} }
public Drawable getIcon() { public Drawable getIcon() {

View File

@ -25,11 +25,13 @@ import android.graphics.drawable.Drawable;
import android.util.Log; import android.util.Log;
import android.util.TypedValue; import android.util.TypedValue;
import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.StringTokenizer; import java.util.StringTokenizer;
public class KeyStyles { public class KeyStyles {
private static final String TAG = "KeyStyles"; private static final String TAG = "KeyStyles";
private static final boolean DEBUG = false;
private final HashMap<String, DeclaredKeyStyle> mStyles = private final HashMap<String, DeclaredKeyStyle> mStyles =
new HashMap<String, DeclaredKeyStyle>(); new HashMap<String, DeclaredKeyStyle>();
@ -37,15 +39,15 @@ public class KeyStyles {
public interface KeyStyle { public interface KeyStyle {
public int[] getIntArray(TypedArray a, int index); public int[] getIntArray(TypedArray a, int index);
public CharSequence[] getTextArray(TypedArray a, int index);
public Drawable getDrawable(TypedArray a, int index); public Drawable getDrawable(TypedArray a, int index);
public CharSequence getText(TypedArray a, int index); public CharSequence getText(TypedArray a, int index);
public int getResourceId(TypedArray a, int index, int defaultValue);
public int getInt(TypedArray a, int index, int defaultValue); public int getInt(TypedArray a, int index, int defaultValue);
public int getFlag(TypedArray a, int index, int defaultValue); public int getFlag(TypedArray a, int index, int defaultValue);
public boolean getBoolean(TypedArray a, int index, boolean defaultValue); public boolean getBoolean(TypedArray a, int index, boolean defaultValue);
} }
public static class EmptyKeyStyle implements KeyStyle { /* package */ static class EmptyKeyStyle implements KeyStyle {
private EmptyKeyStyle() { private EmptyKeyStyle() {
// Nothing to do. // Nothing to do.
} }
@ -55,6 +57,11 @@ public class KeyStyles {
return parseIntArray(a, index); return parseIntArray(a, index);
} }
@Override
public CharSequence[] getTextArray(TypedArray a, int index) {
return parseTextArray(a, index);
}
@Override @Override
public Drawable getDrawable(TypedArray a, int index) { public Drawable getDrawable(TypedArray a, int index) {
return a.getDrawable(index); return a.getDrawable(index);
@ -65,11 +72,6 @@ public class KeyStyles {
return a.getText(index); return a.getText(index);
} }
@Override
public int getResourceId(TypedArray a, int index, int defaultValue) {
return a.getResourceId(index, defaultValue);
}
@Override @Override
public int getInt(TypedArray a, int index, int defaultValue) { public int getInt(TypedArray a, int index, int defaultValue) {
return a.getInt(index, defaultValue); return a.getInt(index, defaultValue);
@ -85,19 +87,71 @@ public class KeyStyles {
return a.getBoolean(index, defaultValue); return a.getBoolean(index, defaultValue);
} }
protected static CharSequence[] parseTextArray(TypedArray a, int index) {
if (!a.hasValue(index))
return null;
final CharSequence text = a.getText(index);
return parseCsvText(text);
}
/* package */ static CharSequence[] parseCsvText(CharSequence text) {
final int size = text.length();
if (size == 0) return null;
if (size == 1) return new CharSequence[] { text };
final StringBuilder sb = new StringBuilder();
ArrayList<CharSequence> list = null;
int start = 0;
for (int pos = 0; pos < size; pos++) {
final char c = text.charAt(pos);
if (c == ',') {
if (list == null) list = new ArrayList<CharSequence>();
if (sb.length() == 0) {
list.add(text.subSequence(start, pos));
} else {
list.add(sb.toString());
sb.setLength(0);
}
start = pos + 1;
continue;
} else if (c == '\\') {
if (start == pos) {
// Skip escape character at the beginning of the value.
start++;
pos++;
} else {
if (start < pos && sb.length() == 0)
sb.append(text.subSequence(start, pos));
pos++;
if (pos < size)
sb.append(text.charAt(pos));
}
} else if (sb.length() > 0) {
sb.append(c);
}
}
if (list == null) {
return new CharSequence[] { sb.length() > 0 ? sb : text.subSequence(start, size) };
} else {
list.add(sb.length() > 0 ? sb : text.subSequence(start, size));
return list.toArray(new CharSequence[list.size()]);
}
}
protected static int[] parseIntArray(TypedArray a, int index) { protected static int[] parseIntArray(TypedArray a, int index) {
if (!a.hasValue(index))
return null;
TypedValue v = new TypedValue(); TypedValue v = new TypedValue();
a.getValue(index, v); a.getValue(index, v);
if (v.type == TypedValue.TYPE_INT_DEC || v.type == TypedValue.TYPE_INT_HEX) { if (v.type == TypedValue.TYPE_INT_DEC || v.type == TypedValue.TYPE_INT_HEX) {
return new int[] { v.data }; return new int[] { v.data };
} else if (v.type == TypedValue.TYPE_STRING) { } else if (v.type == TypedValue.TYPE_STRING) {
return parseCSV(v.string.toString()); return parseCsvInt(v.string.toString());
} else { } else {
return null; return null;
} }
} }
private static int[] parseCSV(String value) { /* package */ static int[] parseCsvInt(String value) {
int count = 0; int count = 0;
int lastIndex = 0; int lastIndex = 0;
if (value.length() > 0) { if (value.length() > 0) {
@ -110,17 +164,13 @@ public class KeyStyles {
count = 0; count = 0;
StringTokenizer st = new StringTokenizer(value, ","); StringTokenizer st = new StringTokenizer(value, ",");
while (st.hasMoreTokens()) { while (st.hasMoreTokens()) {
try {
values[count++] = Integer.parseInt(st.nextToken()); values[count++] = Integer.parseInt(st.nextToken());
} catch (NumberFormatException nfe) {
Log.w(TAG, "Error parsing integer CSV " + value);
}
} }
return values; return values;
} }
} }
public static class DeclaredKeyStyle extends EmptyKeyStyle { private static class DeclaredKeyStyle extends EmptyKeyStyle {
private final HashMap<Integer, Object> mAttributes = new HashMap<Integer, Object>(); private final HashMap<Integer, Object> mAttributes = new HashMap<Integer, Object>();
@Override @Override
@ -129,6 +179,12 @@ public class KeyStyles {
? super.getIntArray(a, index) : (int[])mAttributes.get(index); ? super.getIntArray(a, index) : (int[])mAttributes.get(index);
} }
@Override
public CharSequence[] getTextArray(TypedArray a, int index) {
return a.hasValue(index)
? super.getTextArray(a, index) : (CharSequence[])mAttributes.get(index);
}
@Override @Override
public Drawable getDrawable(TypedArray a, int index) { public Drawable getDrawable(TypedArray a, int index) {
return a.hasValue(index) return a.hasValue(index)
@ -142,9 +198,9 @@ public class KeyStyles {
} }
@Override @Override
public int getResourceId(TypedArray a, int index, int defaultValue) { public int getInt(TypedArray a, int index, int defaultValue) {
final Integer value = (Integer)mAttributes.get(index); final Integer value = (Integer)mAttributes.get(index);
return super.getResourceId(a, index, (value != null) ? value : defaultValue); return super.getInt(a, index, (value != null) ? value : defaultValue);
} }
@Override @Override
@ -163,20 +219,21 @@ public class KeyStyles {
super(); super();
} }
private void parseKeyStyleAttributes(TypedArray a) { private void parseKeyStyleAttributes(TypedArray keyAttr) {
// TODO: Currently not all Key attributes can be declared as style. // TODO: Currently not all Key attributes can be declared as style.
readIntArray(a, R.styleable.Keyboard_Key_codes); readIntArray(keyAttr, R.styleable.Keyboard_Key_codes);
readText(a, R.styleable.Keyboard_Key_keyLabel); readText(keyAttr, R.styleable.Keyboard_Key_keyLabel);
readFlag(a, R.styleable.Keyboard_Key_keyLabelOption); readFlag(keyAttr, R.styleable.Keyboard_Key_keyLabelOption);
readText(a, R.styleable.Keyboard_Key_keyOutputText); readTextArray(keyAttr, R.styleable.Keyboard_Key_popupCharacters);
readDrawable(a, R.styleable.Keyboard_Key_keyIcon); readInt(keyAttr, R.styleable.Keyboard_Key_maxPopupKeyboardColumn);
readDrawable(a, R.styleable.Keyboard_Key_iconPreview); readText(keyAttr, R.styleable.Keyboard_Key_keyOutputText);
readDrawable(a, R.styleable.Keyboard_Key_keyHintIcon); readDrawable(keyAttr, R.styleable.Keyboard_Key_keyIcon);
readDrawable(a, R.styleable.Keyboard_Key_shiftedIcon); readDrawable(keyAttr, R.styleable.Keyboard_Key_iconPreview);
readResourceId(a, R.styleable.Keyboard_Key_popupKeyboard); readDrawable(keyAttr, R.styleable.Keyboard_Key_keyHintIcon);
readBoolean(a, R.styleable.Keyboard_Key_isModifier); readDrawable(keyAttr, R.styleable.Keyboard_Key_shiftedIcon);
readBoolean(a, R.styleable.Keyboard_Key_isSticky); readBoolean(keyAttr, R.styleable.Keyboard_Key_isModifier);
readBoolean(a, R.styleable.Keyboard_Key_isRepeatable); readBoolean(keyAttr, R.styleable.Keyboard_Key_isSticky);
readBoolean(keyAttr, R.styleable.Keyboard_Key_isRepeatable);
} }
private void readDrawable(TypedArray a, int index) { private void readDrawable(TypedArray a, int index) {
@ -189,9 +246,9 @@ public class KeyStyles {
mAttributes.put(index, a.getText(index)); mAttributes.put(index, a.getText(index));
} }
private void readResourceId(TypedArray a, int index) { private void readInt(TypedArray a, int index) {
if (a.hasValue(index)) if (a.hasValue(index))
mAttributes.put(index, a.getResourceId(index, 0)); mAttributes.put(index, a.getInt(index, 0));
} }
private void readFlag(TypedArray a, int index) { private void readFlag(TypedArray a, int index) {
@ -206,11 +263,15 @@ public class KeyStyles {
} }
private void readIntArray(TypedArray a, int index) { private void readIntArray(TypedArray a, int index) {
if (a.hasValue(index)) {
final int[] value = parseIntArray(a, index); final int[] value = parseIntArray(a, index);
if (value != null) if (value != null)
mAttributes.put(index, value); mAttributes.put(index, value);
} }
private void readTextArray(TypedArray a, int index) {
final CharSequence[] value = parseTextArray(a, index);
if (value != null)
mAttributes.put(index, value);
} }
private void addParent(DeclaredKeyStyle parentStyle) { private void addParent(DeclaredKeyStyle parentStyle) {
@ -218,15 +279,17 @@ public class KeyStyles {
} }
} }
public void parseKeyStyleAttributes(TypedArray a, TypedArray keyAttrs, public void parseKeyStyleAttributes(TypedArray keyStyleAttr, TypedArray keyAttrs,
XmlResourceParser parser) { XmlResourceParser parser) {
String styleName = a.getString(R.styleable.Keyboard_KeyStyle_styleName); String styleName = keyStyleAttr.getString(R.styleable.Keyboard_KeyStyle_styleName);
if (DEBUG) Log.d(TAG, String.format("<%s styleName=%s />",
KeyboardParser.TAG_KEY_STYLE, styleName));
if (mStyles.containsKey(styleName)) if (mStyles.containsKey(styleName))
throw new ParseException("duplicate key style declared: " + styleName, parser); throw new ParseException("duplicate key style declared: " + styleName, parser);
final DeclaredKeyStyle style = new DeclaredKeyStyle(); final DeclaredKeyStyle style = new DeclaredKeyStyle();
if (a.hasValue(R.styleable.Keyboard_KeyStyle_parentStyle)) { if (keyStyleAttr.hasValue(R.styleable.Keyboard_KeyStyle_parentStyle)) {
String parentStyle = a.getString( String parentStyle = keyStyleAttr.getString(
R.styleable.Keyboard_KeyStyle_parentStyle); R.styleable.Keyboard_KeyStyle_parentStyle);
final DeclaredKeyStyle parent = mStyles.get(parentStyle); final DeclaredKeyStyle parent = mStyles.get(parentStyle);
if (parent == null) if (parent == null)

View File

@ -22,7 +22,6 @@ import org.xmlpull.v1.XmlPullParserException;
import android.content.Context; import android.content.Context;
import android.content.res.Resources; import android.content.res.Resources;
import android.content.res.XmlResourceParser;
import android.graphics.drawable.Drawable; import android.graphics.drawable.Drawable;
import android.util.Log; import android.util.Log;
@ -92,6 +91,12 @@ public class Keyboard {
/** Default gap between rows */ /** Default gap between rows */
private int mDefaultVerticalGap; private int mDefaultVerticalGap;
/** Popup keyboard template */
private int mPopupKeyboardResId;
/** Maximum column for popup keyboard */
private int mMaxPopupColumn;
/** List of shift keys in this keyboard and its icons and state */ /** List of shift keys in this keyboard and its icons and state */
private final List<Key> mShiftKeys = new ArrayList<Key>(); private final List<Key> mShiftKeys = new ArrayList<Key>();
private final HashMap<Key, Drawable> mShiftedIcons = new HashMap<Key, Drawable>(); private final HashMap<Key, Drawable> mShiftedIcons = new HashMap<Key, Drawable>();
@ -108,10 +113,10 @@ public class Keyboard {
private int mTotalHeight; private int mTotalHeight;
/** /**
* Total width of the keyboard, including left side gaps and keys, but not any gaps on the * Total width (minimum width) of the keyboard, including left side gaps and keys, but not any
* right side. * gaps on the right side.
*/ */
private int mTotalWidth; private int mMinWidth;
/** List of keys in this keyboard */ /** List of keys in this keyboard */
private final List<Key> mKeys = new ArrayList<Key>(); private final List<Key> mKeys = new ArrayList<Key>();
@ -144,27 +149,9 @@ public class Keyboard {
* Creates a keyboard from the given xml key layout file. * Creates a keyboard from the given xml key layout file.
* @param context the application or service context * @param context the application or service context
* @param xmlLayoutResId the resource file that contains the keyboard layout and keys. * @param xmlLayoutResId the resource file that contains the keyboard layout and keys.
*/
public Keyboard(Context context, int xmlLayoutResId) {
this(context, xmlLayoutResId, null);
}
/**
* Creates a keyboard from the given keyboard identifier.
* @param context the application or service context
* @param id keyboard identifier * @param id keyboard identifier
*/ */
public Keyboard(Context context, KeyboardId id) { public Keyboard(Context context, int xmlLayoutResId, KeyboardId id) {
this(context, id.getXmlId(), id);
}
/**
* Creates a keyboard from the given xml key layout file.
* @param context the application or service context
* @param xmlLayoutResId the resource file that contains the keyboard layout and keys.
* @param id keyboard identifier
*/
private Keyboard(Context context, int xmlLayoutResId, KeyboardId id) {
this(context, xmlLayoutResId, id, this(context, xmlLayoutResId, id,
context.getResources().getDisplayMetrics().widthPixels, context.getResources().getDisplayMetrics().widthPixels,
context.getResources().getDisplayMetrics().heightPixels); context.getResources().getDisplayMetrics().heightPixels);
@ -188,49 +175,6 @@ public class Keyboard {
loadKeyboard(context, xmlLayoutResId); loadKeyboard(context, xmlLayoutResId);
} }
/**
* <p>Creates a blank keyboard from the given resource file and populates it with the specified
* characters in left-to-right, top-to-bottom fashion, using the specified number of columns.
* </p>
* <p>If the specified number of columns is -1, then the keyboard will fit as many keys as
* possible in each row.</p>
* @param context the application or service context
* @param layoutTemplateResId the layout template file, containing no keys.
* @param characters the list of characters to display on the keyboard. One key will be created
* for each character.
* @param columns the number of columns of keys to display. If this number is greater than the
* number of keys that can fit in a row, it will be ignored. If this number is -1, the
* keyboard will fit as many keys as possible in each row.
*/
public Keyboard(Context context, int layoutTemplateResId,
CharSequence characters, int columns, int horizontalPadding) {
this(context, layoutTemplateResId);
int x = 0;
int y = 0;
int column = 0;
mTotalWidth = 0;
final Row row = new Row(this);
final int maxColumns = columns == -1 ? Integer.MAX_VALUE : columns;
for (int i = 0; i < characters.length(); i++) {
char c = characters.charAt(i);
if (column >= maxColumns
|| x + mDefaultWidth + horizontalPadding > mDisplayWidth) {
x = 0;
y += mDefaultVerticalGap + mDefaultHeight;
column = 0;
}
final Key key = new Key(row, c, x, y);
column++;
x += key.mWidth + key.mGap;
mKeys.add(key);
if (x > mTotalWidth) {
mTotalWidth = x;
}
}
mTotalHeight = y + mDefaultHeight;
}
public List<Key> getKeys() { public List<Key> getKeys() {
return mKeys; return mKeys;
} }
@ -277,8 +221,16 @@ public class Keyboard {
return mTotalHeight; return mTotalHeight;
} }
public void setHeight(int height) {
mTotalHeight = height;
}
public int getMinWidth() { public int getMinWidth() {
return mTotalWidth; return mMinWidth;
}
public void setMinWidth(int minWidth) {
mMinWidth = minWidth;
} }
public int getDisplayHeight() { public int getDisplayHeight() {
@ -297,6 +249,22 @@ public class Keyboard {
mKeyboardHeight = height; mKeyboardHeight = height;
} }
public int getPopupKeyboardResId() {
return mPopupKeyboardResId;
}
public void setPopupKeyboardResId(int resId) {
mPopupKeyboardResId = resId;
}
public int getMaxPopupKeyboardColumn() {
return mMaxPopupColumn;
}
public void setMaxPopupKeyboardColumn(int column) {
mMaxPopupColumn = column;
}
public List<Key> getShiftKeys() { public List<Key> getShiftKeys() {
return mShiftKeys; return mShiftKeys;
} }
@ -429,24 +397,12 @@ public class Keyboard {
return EMPTY_INT_ARRAY; return EMPTY_INT_ARRAY;
} }
// TODO should be private
protected Row createRowFromXml(Resources res, XmlResourceParser parser) {
return new Row(res, this, parser);
}
// TODO should be private
protected Key createKeyFromXml(Resources res, Row parent, int x, int y,
XmlResourceParser parser, KeyStyles keyStyles) {
return new Key(res, parent, x, y, parser, keyStyles);
}
private void loadKeyboard(Context context, int xmlLayoutResId) { private void loadKeyboard(Context context, int xmlLayoutResId) {
try { try {
final Resources res = context.getResources(); KeyboardParser parser = new KeyboardParser(this, context.getResources());
KeyboardParser parser = new KeyboardParser(this, res); parser.parseKeyboard(xmlLayoutResId);
parser.parseKeyboard(res.getXml(xmlLayoutResId)); // mMinWidth is the width of this keyboard which is maximum width of row.
// mTotalWidth is the width of this keyboard which is maximum width of row. mMinWidth = parser.getMaxRowWidth();
mTotalWidth = parser.getMaxRowWidth();
mTotalHeight = parser.getTotalHeight(); mTotalHeight = parser.getTotalHeight();
} catch (XmlPullParserException e) { } catch (XmlPullParserException e) {
Log.w(TAG, "keyboard XML parse error: " + e); Log.w(TAG, "keyboard XML parse error: " + e);

View File

@ -46,12 +46,13 @@ public class KeyboardId {
public final boolean mHasVoiceKey; public final boolean mHasVoiceKey;
public final int mImeOptions; public final int mImeOptions;
public final boolean mEnableShiftLock; public final boolean mEnableShiftLock;
public final String mXmlName;
private final int mHashCode; private final int mHashCode;
public KeyboardId(Locale locale, int orientation, int mode, public KeyboardId(String xmlName, int xmlId, Locale locale, int orientation, int mode,
int xmlId, int colorScheme, boolean hasSettingsKey, boolean voiceKeyEnabled, int colorScheme, boolean hasSettingsKey, boolean voiceKeyEnabled, boolean hasVoiceKey,
boolean hasVoiceKey, int imeOptions, boolean enableShiftLock) { int imeOptions, boolean enableShiftLock) {
this.mLocale = locale; this.mLocale = locale;
this.mOrientation = orientation; this.mOrientation = orientation;
this.mMode = mode; this.mMode = mode;
@ -64,6 +65,7 @@ public class KeyboardId {
this.mImeOptions = imeOptions this.mImeOptions = imeOptions
& (EditorInfo.IME_MASK_ACTION | EditorInfo.IME_FLAG_NO_ENTER_ACTION); & (EditorInfo.IME_MASK_ACTION | EditorInfo.IME_FLAG_NO_ENTER_ACTION);
this.mEnableShiftLock = enableShiftLock; this.mEnableShiftLock = enableShiftLock;
this.mXmlName = xmlName;
this.mHashCode = Arrays.hashCode(new Object[] { this.mHashCode = Arrays.hashCode(new Object[] {
locale, locale,
@ -120,12 +122,12 @@ public class KeyboardId {
@Override @Override
public String toString() { public String toString() {
return String.format("[%s %s %5s imeOptions=0x%08x xml=0x%08x %s%s%s%s%s]", return String.format("[%s.xml %s %s %s imeOptions=%s %s%s%s%s%s]",
mXmlName,
mLocale, mLocale,
(mOrientation == 1 ? "port" : "land"), (mOrientation == 1 ? "port" : "land"),
modeName(mMode), modeName(mMode),
mImeOptions, imeOptionsName(mImeOptions),
mXmlId,
colorSchemeName(mColorScheme), colorSchemeName(mColorScheme),
(mHasSettingsKey ? " hasSettingsKey" : ""), (mHasSettingsKey ? " hasSettingsKey" : ""),
(mVoiceKeyEnabled ? " voiceKeyEnabled" : ""), (mVoiceKeyEnabled ? " voiceKeyEnabled" : ""),
@ -133,7 +135,7 @@ public class KeyboardId {
(mEnableShiftLock ? " enableShiftLock" : "")); (mEnableShiftLock ? " enableShiftLock" : ""));
} }
private static String modeName(int mode) { public static String modeName(int mode) {
switch (mode) { switch (mode) {
case MODE_TEXT: return "text"; case MODE_TEXT: return "text";
case MODE_URL: return "url"; case MODE_URL: return "url";
@ -146,11 +148,33 @@ public class KeyboardId {
return null; return null;
} }
private static String colorSchemeName(int colorScheme) { public static String colorSchemeName(int colorScheme) {
switch (colorScheme) { switch (colorScheme) {
case KeyboardView.COLOR_SCHEME_WHITE: return "white"; case KeyboardView.COLOR_SCHEME_WHITE: return "white";
case KeyboardView.COLOR_SCHEME_BLACK: return "black"; case KeyboardView.COLOR_SCHEME_BLACK: return "black";
} }
return null; return null;
} }
public static String imeOptionsName(int imeOptions) {
if (imeOptions == -1) return null;
final int actionNo = imeOptions & EditorInfo.IME_MASK_ACTION;
final String action;
switch (actionNo) {
case EditorInfo.IME_ACTION_UNSPECIFIED: action = "actionUnspecified"; break;
case EditorInfo.IME_ACTION_NONE: action = "actionNone"; break;
case EditorInfo.IME_ACTION_GO: action = "actionGo"; break;
case EditorInfo.IME_ACTION_SEARCH: action = "actionSearch"; break;
case EditorInfo.IME_ACTION_SEND: action = "actionSend"; break;
case EditorInfo.IME_ACTION_DONE: action = "actionDone"; break;
case EditorInfo.IME_ACTION_PREVIOUS: action = "actionPrevious"; break;
default: action = "actionUnknown(" + actionNo + ")"; break;
} }
if ((imeOptions & EditorInfo.IME_FLAG_NO_ENTER_ACTION) != 0) {
return "flagNoEnterAction|" + action;
} else {
return action;
}
}
}

View File

@ -30,6 +30,7 @@ import android.util.Xml;
import android.view.InflateException; import android.view.InflateException;
import java.io.IOException; import java.io.IOException;
import java.util.Arrays;
import java.util.List; import java.util.List;
/** /**
@ -103,7 +104,7 @@ import java.util.List;
public class KeyboardParser { public class KeyboardParser {
private static final String TAG = "KeyboardParser"; private static final String TAG = "KeyboardParser";
private static final boolean DEBUG_TAG = false; private static final boolean DEBUG = false;
// Keyboard XML Tags // Keyboard XML Tags
private static final String TAG_KEYBOARD = "Keyboard"; private static final String TAG_KEYBOARD = "Keyboard";
@ -115,7 +116,7 @@ public class KeyboardParser {
private static final String TAG_SWITCH = "switch"; private static final String TAG_SWITCH = "switch";
private static final String TAG_CASE = "case"; private static final String TAG_CASE = "case";
private static final String TAG_DEFAULT = "default"; private static final String TAG_DEFAULT = "default";
private static final String TAG_KEY_STYLE = "key-style"; public static final String TAG_KEY_STYLE = "key-style";
private final Keyboard mKeyboard; private final Keyboard mKeyboard;
private final Resources mResources; private final Resources mResources;
@ -140,13 +141,13 @@ public class KeyboardParser {
return mTotalHeight; return mTotalHeight;
} }
public void parseKeyboard(XmlResourceParser parser) public void parseKeyboard(int resId) throws XmlPullParserException, IOException {
throws XmlPullParserException, IOException { if (DEBUG) Log.d(TAG, String.format("<%s> %s", TAG_KEYBOARD, mKeyboard.mId));
final XmlResourceParser parser = mResources.getXml(resId);
int event; int event;
while ((event = parser.next()) != XmlPullParser.END_DOCUMENT) { while ((event = parser.next()) != XmlPullParser.END_DOCUMENT) {
if (event == XmlPullParser.START_TAG) { if (event == XmlPullParser.START_TAG) {
final String tag = parser.getName(); final String tag = parser.getName();
if (DEBUG_TAG) debugStartTag("parseKeyboard", tag, false);
if (TAG_KEYBOARD.equals(tag)) { if (TAG_KEYBOARD.equals(tag)) {
parseKeyboardAttributes(parser); parseKeyboardAttributes(parser);
parseKeyboardContent(parser, mKeyboard.getKeys()); parseKeyboardContent(parser, mKeyboard.getKeys());
@ -160,28 +161,38 @@ public class KeyboardParser {
private void parseKeyboardAttributes(XmlResourceParser parser) { private void parseKeyboardAttributes(XmlResourceParser parser) {
final Keyboard keyboard = mKeyboard; final Keyboard keyboard = mKeyboard;
final TypedArray a = mResources.obtainAttributes(Xml.asAttributeSet(parser), final TypedArray keyboardAttr = mResources.obtainAttributes(Xml.asAttributeSet(parser),
R.styleable.Keyboard); R.styleable.Keyboard);
final TypedArray keyAttr = mResources.obtainAttributes(Xml.asAttributeSet(parser),
R.styleable.Keyboard_Key);
try {
final int displayHeight = keyboard.getDisplayHeight(); final int displayHeight = keyboard.getDisplayHeight();
final int keyboardHeight = (int)a.getDimension( final int keyboardHeight = (int)keyboardAttr.getDimension(
R.styleable.Keyboard_keyboardHeight, displayHeight / 2); R.styleable.Keyboard_keyboardHeight, displayHeight / 2);
final int maxKeyboardHeight = getDimensionOrFraction(a, final int maxKeyboardHeight = getDimensionOrFraction(keyboardAttr,
R.styleable.Keyboard_maxKeyboardHeight, displayHeight, displayHeight / 2); R.styleable.Keyboard_maxKeyboardHeight, displayHeight, displayHeight / 2);
// Keyboard height will not exceed maxKeyboardHeight. // Keyboard height will not exceed maxKeyboardHeight.
final int height = Math.min(keyboardHeight, maxKeyboardHeight); final int height = Math.min(keyboardHeight, maxKeyboardHeight);
final int width = keyboard.getDisplayWidth(); final int width = keyboard.getDisplayWidth();
keyboard.setKeyboardHeight(height); keyboard.setKeyboardHeight(height);
keyboard.setKeyWidth(getDimensionOrFraction(a, keyboard.setKeyWidth(getDimensionOrFraction(keyboardAttr,
R.styleable.Keyboard_keyWidth, width, width / 10)); R.styleable.Keyboard_keyWidth, width, width / 10));
keyboard.setRowHeight(getDimensionOrFraction(a, keyboard.setRowHeight(getDimensionOrFraction(keyboardAttr,
R.styleable.Keyboard_rowHeight, height, 50)); R.styleable.Keyboard_rowHeight, height, 50));
keyboard.setHorizontalGap(getDimensionOrFraction(a, keyboard.setHorizontalGap(getDimensionOrFraction(keyboardAttr,
R.styleable.Keyboard_horizontalGap, width, 0)); R.styleable.Keyboard_horizontalGap, width, 0));
keyboard.setVerticalGap(getDimensionOrFraction(a, keyboard.setVerticalGap(getDimensionOrFraction(keyboardAttr,
R.styleable.Keyboard_verticalGap, height, 0)); R.styleable.Keyboard_verticalGap, height, 0));
a.recycle(); keyboard.setPopupKeyboardResId(keyboardAttr.getResourceId(
if (DEBUG_TAG) Log.d(TAG, "id=" + keyboard.mId); R.styleable.Keyboard_popupKeyboardTemplate, 0));
keyboard.setMaxPopupKeyboardColumn(keyAttr.getInt(
R.styleable.Keyboard_Key_maxPopupKeyboardColumn, 5));
} finally {
keyAttr.recycle();
keyboardAttr.recycle();
}
} }
private void parseKeyboardContent(XmlResourceParser parser, List<Key> keys) private void parseKeyboardContent(XmlResourceParser parser, List<Key> keys)
@ -190,9 +201,9 @@ public class KeyboardParser {
while ((event = parser.next()) != XmlPullParser.END_DOCUMENT) { while ((event = parser.next()) != XmlPullParser.END_DOCUMENT) {
if (event == XmlPullParser.START_TAG) { if (event == XmlPullParser.START_TAG) {
final String tag = parser.getName(); final String tag = parser.getName();
if (DEBUG_TAG) debugStartTag("parseKeyboardContent", tag, keys == null);
if (TAG_ROW.equals(tag)) { if (TAG_ROW.equals(tag)) {
Row row = mKeyboard.createRowFromXml(mResources, parser); Row row = new Row(mResources, mKeyboard, parser);
if (DEBUG) Log.d(TAG, String.format("<%s>", TAG_ROW));
if (keys != null) if (keys != null)
startRow(row); startRow(row);
parseRowContent(parser, row, keys); parseRowContent(parser, row, keys);
@ -207,13 +218,12 @@ public class KeyboardParser {
} }
} else if (event == XmlPullParser.END_TAG) { } else if (event == XmlPullParser.END_TAG) {
final String tag = parser.getName(); final String tag = parser.getName();
if (DEBUG_TAG) debugEndTag("parseKeyboardContent", tag, keys == null);
if (TAG_KEYBOARD.equals(tag)) { if (TAG_KEYBOARD.equals(tag)) {
endKeyboard(mKeyboard.getVerticalGap()); endKeyboard(mKeyboard.getVerticalGap());
break; break;
} else if (TAG_CASE.equals(tag) || TAG_DEFAULT.equals(tag)) { } else if (TAG_CASE.equals(tag) || TAG_DEFAULT.equals(tag)
break; || TAG_MERGE.equals(tag)) {
} else if (TAG_MERGE.equals(tag)) { if (DEBUG) Log.d(TAG, String.format("</%s>", tag));
break; break;
} else if (TAG_KEY_STYLE.equals(tag)) { } else if (TAG_KEY_STYLE.equals(tag)) {
continue; continue;
@ -230,7 +240,6 @@ public class KeyboardParser {
while ((event = parser.next()) != XmlPullParser.END_DOCUMENT) { while ((event = parser.next()) != XmlPullParser.END_DOCUMENT) {
if (event == XmlPullParser.START_TAG) { if (event == XmlPullParser.START_TAG) {
final String tag = parser.getName(); final String tag = parser.getName();
if (DEBUG_TAG) debugStartTag("parseRowContent", tag, keys == null);
if (TAG_KEY.equals(tag)) { if (TAG_KEY.equals(tag)) {
parseKey(parser, row, keys); parseKey(parser, row, keys);
} else if (TAG_SPACER.equals(tag)) { } else if (TAG_SPACER.equals(tag)) {
@ -246,14 +255,14 @@ public class KeyboardParser {
} }
} else if (event == XmlPullParser.END_TAG) { } else if (event == XmlPullParser.END_TAG) {
final String tag = parser.getName(); final String tag = parser.getName();
if (DEBUG_TAG) debugEndTag("parseRowContent", tag, keys == null);
if (TAG_ROW.equals(tag)) { if (TAG_ROW.equals(tag)) {
if (DEBUG) Log.d(TAG, String.format("</%s>", TAG_ROW));
if (keys != null) if (keys != null)
endRow(); endRow();
break; break;
} else if (TAG_CASE.equals(tag) || TAG_DEFAULT.equals(tag)) { } else if (TAG_CASE.equals(tag) || TAG_DEFAULT.equals(tag)
break; || TAG_MERGE.equals(tag)) {
} else if (TAG_MERGE.equals(tag)) { if (DEBUG) Log.d(TAG, String.format("</%s>", tag));
break; break;
} else if (TAG_KEY_STYLE.equals(tag)) { } else if (TAG_KEY_STYLE.equals(tag)) {
continue; continue;
@ -269,8 +278,10 @@ public class KeyboardParser {
if (keys == null) { if (keys == null) {
checkEndTag(TAG_KEY, parser); checkEndTag(TAG_KEY, parser);
} else { } else {
Key key = mKeyboard.createKeyFromXml(mResources, row, mCurrentX, mCurrentY, parser, Key key = new Key(mResources, row, mCurrentX, mCurrentY, parser, mKeyStyles);
mKeyStyles); if (DEBUG) Log.d(TAG, String.format("<%s keyLabel=%s codes=%s popupCharacters=%s />",
TAG_KEY, key.mLabel, Arrays.toString(key.mCodes),
Arrays.toString(key.mPopupCharacters)));
checkEndTag(TAG_KEY, parser); checkEndTag(TAG_KEY, parser);
keys.add(key); keys.add(key);
if (key.mCodes[0] == Keyboard.CODE_SHIFT) if (key.mCodes[0] == Keyboard.CODE_SHIFT)
@ -286,6 +297,7 @@ public class KeyboardParser {
if (keys == null) { if (keys == null) {
checkEndTag(TAG_SPACER, parser); checkEndTag(TAG_SPACER, parser);
} else { } else {
if (DEBUG) Log.d(TAG, String.format("<%s />", TAG_SPACER));
final TypedArray a = mResources.obtainAttributes(Xml.asAttributeSet(parser), final TypedArray a = mResources.obtainAttributes(Xml.asAttributeSet(parser),
R.styleable.Keyboard); R.styleable.Keyboard);
final int gap = getDimensionOrFraction(a, R.styleable.Keyboard_horizontalGap, final int gap = getDimensionOrFraction(a, R.styleable.Keyboard_horizontalGap,
@ -320,7 +332,8 @@ public class KeyboardParser {
checkEndTag(TAG_INCLUDE, parser); checkEndTag(TAG_INCLUDE, parser);
if (keyboardLayout == 0) if (keyboardLayout == 0)
throw new ParseException("No keyboardLayout attribute in <include/>", parser); throw new ParseException("No keyboardLayout attribute in <include/>", parser);
if (DEBUG_TAG) Log.d(TAG, String.format(" keyboardLayout=0x%08x", keyboardLayout)); if (DEBUG) Log.d(TAG, String.format("<%s keyboardLayout=%s />",
TAG_INCLUDE, mResources.getResourceEntryName(keyboardLayout)));
parseMerge(mResources.getLayout(keyboardLayout), row, keys); parseMerge(mResources.getLayout(keyboardLayout), row, keys);
} }
} }
@ -331,7 +344,6 @@ public class KeyboardParser {
while ((event = parser.next()) != XmlPullParser.END_DOCUMENT) { while ((event = parser.next()) != XmlPullParser.END_DOCUMENT) {
if (event == XmlPullParser.START_TAG) { if (event == XmlPullParser.START_TAG) {
final String tag = parser.getName(); final String tag = parser.getName();
if (DEBUG_TAG) debugStartTag("parseMerge", tag, keys == null);
if (TAG_MERGE.equals(tag)) { if (TAG_MERGE.equals(tag)) {
if (row == null) { if (row == null) {
parseKeyboardContent(parser, keys); parseKeyboardContent(parser, keys);
@ -359,13 +371,12 @@ public class KeyboardParser {
private void parseSwitchInternal(XmlResourceParser parser, Row row, List<Key> keys) private void parseSwitchInternal(XmlResourceParser parser, Row row, List<Key> keys)
throws XmlPullParserException, IOException { throws XmlPullParserException, IOException {
if (DEBUG) Log.d(TAG, String.format("<%s> %s", TAG_SWITCH, mKeyboard.mId));
boolean selected = false; boolean selected = false;
int event; int event;
if (DEBUG_TAG) Log.d(TAG, "parseSwitchInternal: id=" + mKeyboard.mId);
while ((event = parser.next()) != XmlPullParser.END_DOCUMENT) { while ((event = parser.next()) != XmlPullParser.END_DOCUMENT) {
if (event == XmlPullParser.START_TAG) { if (event == XmlPullParser.START_TAG) {
final String tag = parser.getName(); final String tag = parser.getName();
if (DEBUG_TAG) debugStartTag("parseSwitchInternal", tag, keys == null);
if (TAG_CASE.equals(tag)) { if (TAG_CASE.equals(tag)) {
selected |= parseCase(parser, row, selected ? null : keys); selected |= parseCase(parser, row, selected ? null : keys);
} else if (TAG_DEFAULT.equals(tag)) { } else if (TAG_DEFAULT.equals(tag)) {
@ -375,8 +386,8 @@ public class KeyboardParser {
} }
} else if (event == XmlPullParser.END_TAG) { } else if (event == XmlPullParser.END_TAG) {
final String tag = parser.getName(); final String tag = parser.getName();
if (DEBUG_TAG) debugEndTag("parseRowContent", tag, keys == null);
if (TAG_SWITCH.equals(tag)) { if (TAG_SWITCH.equals(tag)) {
if (DEBUG) Log.d(TAG, String.format("</%s>", TAG_SWITCH));
break; break;
} else { } else {
throw new IllegalEndTag(parser, TAG_KEY); throw new IllegalEndTag(parser, TAG_KEY);
@ -426,20 +437,17 @@ public class KeyboardParser {
final boolean selected = modeMatched && settingsKeyMatched && voiceEnabledMatched final boolean selected = modeMatched && settingsKeyMatched && voiceEnabledMatched
&& voiceKeyMatched && colorSchemeMatched && imeOptionsMatched; && voiceKeyMatched && colorSchemeMatched && imeOptionsMatched;
if (DEBUG_TAG) { if (DEBUG) Log.d(TAG, String.format("<%s%s%s%s%s%s%s> %s", TAG_CASE,
Log.d(TAG, String.format( textAttr(KeyboardId.modeName(
"parseCaseCondition: %s%s%s%s%s%s%s", a.getInt(R.styleable.Keyboard_Case_mode, -1)), "mode"),
Boolean.toString(selected).toUpperCase(), textAttr(KeyboardId.colorSchemeName(
debugInteger(a, R.styleable.Keyboard_Case_mode, "mode"), a.getInt(R.styleable.KeyboardView_colorScheme, -1)), "colorSchemeName"),
debugBoolean(a, R.styleable.Keyboard_Case_hasSettingsKey, booleanAttr(a, R.styleable.Keyboard_Case_hasSettingsKey, "hasSettingsKey"),
"hasSettingsKey"), booleanAttr(a, R.styleable.Keyboard_Case_voiceKeyEnabled, "voiceKeyEnabled"),
debugBoolean(a, R.styleable.Keyboard_Case_voiceKeyEnabled, booleanAttr(a, R.styleable.Keyboard_Case_hasVoiceKey, "hasVoiceKey"),
"voiceKeyEnabled"), textAttr(KeyboardId.imeOptionsName(
debugBoolean(a, R.styleable.Keyboard_Case_hasVoiceKey, "hasVoiceKey"), a.getInt(R.styleable.Keyboard_Case_imeOptions, -1)), "imeOptions"),
debugInteger(viewAttr, R.styleable.KeyboardView_colorScheme, Boolean.toString(selected)));
"colorScheme"),
debugInteger(a, R.styleable.Keyboard_Case_imeOptions, "imeOptions")));
}
return selected; return selected;
} finally { } finally {
@ -462,6 +470,7 @@ public class KeyboardParser {
private boolean parseDefault(XmlResourceParser parser, Row row, List<Key> keys) private boolean parseDefault(XmlResourceParser parser, Row row, List<Key> keys)
throws XmlPullParserException, IOException { throws XmlPullParserException, IOException {
if (DEBUG) Log.d(TAG, String.format("<%s>", TAG_DEFAULT));
if (row == null) { if (row == null) {
parseKeyboardContent(parser, keys); parseKeyboardContent(parser, keys);
} else { } else {
@ -471,18 +480,18 @@ public class KeyboardParser {
} }
private void parseKeyStyle(XmlResourceParser parser, List<Key> keys) { private void parseKeyStyle(XmlResourceParser parser, List<Key> keys) {
TypedArray a = mResources.obtainAttributes(Xml.asAttributeSet(parser), TypedArray keyStyleAttr = mResources.obtainAttributes(Xml.asAttributeSet(parser),
R.styleable.Keyboard_KeyStyle); R.styleable.Keyboard_KeyStyle);
TypedArray keyAttrs = mResources.obtainAttributes(Xml.asAttributeSet(parser), TypedArray keyAttrs = mResources.obtainAttributes(Xml.asAttributeSet(parser),
R.styleable.Keyboard_Key); R.styleable.Keyboard_Key);
try { try {
if (!a.hasValue(R.styleable.Keyboard_KeyStyle_styleName)) if (!keyStyleAttr.hasValue(R.styleable.Keyboard_KeyStyle_styleName))
throw new ParseException("<" + TAG_KEY_STYLE throw new ParseException("<" + TAG_KEY_STYLE
+ "/> needs styleName attribute", parser); + "/> needs styleName attribute", parser);
if (keys != null) if (keys != null)
mKeyStyles.parseKeyStyleAttributes(a, keyAttrs, parser); mKeyStyles.parseKeyStyleAttributes(keyStyleAttr, keyAttrs, parser);
} finally { } finally {
a.recycle(); keyStyleAttr.recycle();
keyAttrs.recycle(); keyAttrs.recycle();
} }
} }
@ -561,19 +570,11 @@ public class KeyboardParser {
} }
} }
private static void debugStartTag(String title, String tag, boolean skip) { private static String textAttr(String value, String name) {
Log.d(TAG, title + ": <" + tag + ">" + (skip ? " skip" : "")); return value != null ? String.format(" %s=%s", name, value) : "";
} }
private static void debugEndTag(String title, String tag, boolean skip) { private static String booleanAttr(TypedArray a, int index, String name) {
Log.d(TAG, title + ": </" + tag + ">" + (skip ? " skip" : "")); return a.hasValue(index) ? String.format(" %s=%s", name, a.getBoolean(index, false)) : "";
}
private static String debugInteger(TypedArray a, int index, String name) {
return a.hasValue(index) ? " " + name + "=" + a.getInt(index, 0) : "";
}
private static String debugBoolean(TypedArray a, int index, String name) {
return a.hasValue(index) ? " " + name + "=" + a.getBoolean(index, false) : "";
} }
} }

View File

@ -115,7 +115,8 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha
private void makeSymbolsKeyboardIds() { private void makeSymbolsKeyboardIds() {
final Locale locale = mSubtypeSwitcher.getInputLocale(); final Locale locale = mSubtypeSwitcher.getInputLocale();
final int orientation = mInputMethodService.getResources().getConfiguration().orientation; final Resources res = mInputMethodService.getResources();
final int orientation = res.getConfiguration().orientation;
final int mode = mMode; final int mode = mMode;
final int colorScheme = getColorScheme(); final int colorScheme = getColorScheme();
final boolean hasSettingsKey = mHasSettingsKey; final boolean hasSettingsKey = mHasSettingsKey;
@ -129,12 +130,14 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha
// "more" and "locked more" key labels. To achieve these behavior, we should initialize // "more" and "locked more" key labels. To achieve these behavior, we should initialize
// mSymbolsId and mSymbolsShiftedId to "phone keyboard" and "phone symbols keyboard" // mSymbolsId and mSymbolsShiftedId to "phone keyboard" and "phone symbols keyboard"
// respectively here for xlarge device's layout switching. // respectively here for xlarge device's layout switching.
mSymbolsId = new KeyboardId(locale, orientation, mode, int xmlId = mode == KeyboardId.MODE_PHONE ? R.xml.kbd_phone : R.xml.kbd_symbols;
mode == KeyboardId.MODE_PHONE ? R.xml.kbd_phone : R.xml.kbd_symbols, mSymbolsId = new KeyboardId(
colorScheme, hasSettingsKey, voiceKeyEnabled, hasVoiceKey, imeOptions, true); res.getResourceEntryName(xmlId), xmlId, locale, orientation, mode, colorScheme,
mSymbolsShiftedId = new KeyboardId(locale, orientation, mode, hasSettingsKey, voiceKeyEnabled, hasVoiceKey, imeOptions, true);
mode == KeyboardId.MODE_PHONE ? R.xml.kbd_phone_symbols : R.xml.kbd_symbols_shift, xmlId = mode == KeyboardId.MODE_PHONE ? R.xml.kbd_phone_symbols : R.xml.kbd_symbols_shift;
colorScheme, hasSettingsKey, voiceKeyEnabled, hasVoiceKey, imeOptions, true); mSymbolsShiftedId = new KeyboardId(
res.getResourceEntryName(xmlId), xmlId, locale, orientation, mode, colorScheme,
hasSettingsKey, voiceKeyEnabled, hasVoiceKey, imeOptions, true);
} }
private boolean hasVoiceKey(boolean isSymbols) { private boolean hasVoiceKey(boolean isSymbols) {
@ -230,9 +233,11 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha
enableShiftLock = true; enableShiftLock = true;
} }
} }
final int orientation = mInputMethodService.getResources().getConfiguration().orientation; final Resources res = mInputMethodService.getResources();
final int orientation = res.getConfiguration().orientation;
final Locale locale = mSubtypeSwitcher.getInputLocale(); final Locale locale = mSubtypeSwitcher.getInputLocale();
return new KeyboardId(locale, orientation, mode, xmlId, charColorId, return new KeyboardId(
res.getResourceEntryName(xmlId), xmlId, locale, orientation, mode, charColorId,
mHasSettingsKey, mVoiceKeyEnabled, hasVoiceKey, imeOptions, enableShiftLock); mHasSettingsKey, mVoiceKeyEnabled, hasVoiceKey, imeOptions, enableShiftLock);
} }

View File

@ -1000,7 +1000,7 @@ public class KeyboardView extends View implements PointerTracker.UIProxy {
} }
// Set the preview background state // Set the preview background state
mPreviewText.getBackground().setState( mPreviewText.getBackground().setState(
key.mPopupResId != 0 ? LONG_PRESSABLE_STATE_SET : EMPTY_STATE_SET); key.mPopupCharacters != null ? LONG_PRESSABLE_STATE_SET : EMPTY_STATE_SET);
popupPreviewX += mOffsetInWindow[0]; popupPreviewX += mOffsetInWindow[0];
popupPreviewY += mOffsetInWindow[1]; popupPreviewY += mOffsetInWindow[1];
@ -1100,7 +1100,7 @@ public class KeyboardView extends View implements PointerTracker.UIProxy {
} }
private View inflateMiniKeyboardContainer(Key popupKey) { private View inflateMiniKeyboardContainer(Key popupKey) {
int popupKeyboardId = popupKey.mPopupResId; int popupKeyboardResId = mKeyboard.getPopupKeyboardResId();
LayoutInflater inflater = (LayoutInflater)getContext().getSystemService( LayoutInflater inflater = (LayoutInflater)getContext().getSystemService(
Context.LAYOUT_INFLATER_SERVICE); Context.LAYOUT_INFLATER_SERVICE);
View container = inflater.inflate(mPopupLayout, null); View container = inflater.inflate(mPopupLayout, null);
@ -1157,13 +1157,8 @@ public class KeyboardView extends View implements PointerTracker.UIProxy {
// Remove gesture detector on mini-keyboard // Remove gesture detector on mini-keyboard
miniKeyboard.mGestureDetector = null; miniKeyboard.mGestureDetector = null;
Keyboard keyboard; Keyboard keyboard = new MiniKeyboardBuilder(getContext(), popupKeyboardResId, popupKey)
if (popupKey.mPopupCharacters != null) { .build();
keyboard = new Keyboard(getContext(), popupKeyboardId, popupKey.mPopupCharacters,
-1, getPaddingLeft() + getPaddingRight());
} else {
keyboard = new Keyboard(getContext(), popupKeyboardId);
}
miniKeyboard.setKeyboard(keyboard); miniKeyboard.setKeyboard(keyboard);
miniKeyboard.setPopupParent(this); miniKeyboard.setPopupParent(this);
@ -1194,7 +1189,7 @@ public class KeyboardView extends View implements PointerTracker.UIProxy {
* method on the base class if the subclass doesn't wish to handle the call. * method on the base class if the subclass doesn't wish to handle the call.
*/ */
protected boolean onLongPress(Key popupKey) { protected boolean onLongPress(Key popupKey) {
if (popupKey.mPopupResId == 0) if (popupKey.mPopupCharacters == null)
return false; return false;
View container = mMiniKeyboardCache.get(popupKey); View container = mMiniKeyboardCache.get(popupKey);
@ -1272,15 +1267,14 @@ public class KeyboardView extends View implements PointerTracker.UIProxy {
} }
private static boolean hasMultiplePopupChars(Key key) { private static boolean hasMultiplePopupChars(Key key) {
if (key.mPopupCharacters != null && key.mPopupCharacters.length() > 1) { if (key.mPopupCharacters != null && key.mPopupCharacters.length > 1) {
return true; return true;
} }
return false; return false;
} }
private static boolean isNumberAtLeftmostPopupChar(Key key) { private static boolean isNumberAtLeftmostPopupChar(Key key) {
if (key.mPopupCharacters != null && key.mPopupCharacters.length() > 0 if (key.mPopupCharacters != null && isAsciiDigit(key.mPopupCharacters[0].charAt(0))) {
&& isAsciiDigit(key.mPopupCharacters.charAt(0))) {
return true; return true;
} }
return false; return false;

View File

@ -44,15 +44,13 @@ public class LatinKeyboard extends Keyboard {
public static final int OPACITY_FULLY_OPAQUE = 255; public static final int OPACITY_FULLY_OPAQUE = 255;
private static final int SPACE_LED_LENGTH_PERCENT = 80; private static final int SPACE_LED_LENGTH_PERCENT = 80;
private Drawable mShiftLockPreviewIcon; private final Drawable mSpaceAutoCorrectionIndicator;
private Drawable mSpaceAutoCorrectionIndicator;
private final Drawable mButtonArrowLeftIcon; private final Drawable mButtonArrowLeftIcon;
private final Drawable mButtonArrowRightIcon; private final Drawable mButtonArrowRightIcon;
private final int mSpaceBarTextShadowColor; private final int mSpaceBarTextShadowColor;
private int mSpaceKeyIndex = -1; private int mSpaceKeyIndex = -1;
private int mSpaceDragStartX; private int mSpaceDragStartX;
private int mSpaceDragLastDiff; private int mSpaceDragLastDiff;
private final Resources mRes;
private final Context mContext; private final Context mContext;
private boolean mCurrentlyInSpace; private boolean mCurrentlyInSpace;
private SlidingLocaleDrawable mSlidingLocaleIcon; private SlidingLocaleDrawable mSlidingLocaleIcon;
@ -79,10 +77,9 @@ public class LatinKeyboard extends Keyboard {
private static final String MEDIUM_TEXT_SIZE_OF_LANGUAGE_ON_SPACEBAR = "medium"; private static final String MEDIUM_TEXT_SIZE_OF_LANGUAGE_ON_SPACEBAR = "medium";
public LatinKeyboard(Context context, KeyboardId id) { public LatinKeyboard(Context context, KeyboardId id) {
super(context, id); super(context, id.getXmlId(), id);
final Resources res = context.getResources(); final Resources res = context.getResources();
mContext = context; mContext = context;
mRes = res;
if (id.mColorScheme == KeyboardView.COLOR_SCHEME_BLACK) { if (id.mColorScheme == KeyboardView.COLOR_SCHEME_BLACK) {
mSpaceBarTextShadowColor = res.getColor( mSpaceBarTextShadowColor = res.getColor(
R.color.latinkeyboard_bar_language_shadow_black); R.color.latinkeyboard_bar_language_shadow_black);
@ -90,8 +87,6 @@ public class LatinKeyboard extends Keyboard {
mSpaceBarTextShadowColor = res.getColor( mSpaceBarTextShadowColor = res.getColor(
R.color.latinkeyboard_bar_language_shadow_white); R.color.latinkeyboard_bar_language_shadow_white);
} }
mShiftLockPreviewIcon = res.getDrawable(R.drawable.sym_keyboard_feedback_shift_locked);
setDefaultBounds(mShiftLockPreviewIcon);
mSpaceAutoCorrectionIndicator = res.getDrawable(R.drawable.sym_keyboard_space_led); mSpaceAutoCorrectionIndicator = res.getDrawable(R.drawable.sym_keyboard_space_led);
mButtonArrowLeftIcon = res.getDrawable(R.drawable.sym_keyboard_language_arrows_left); mButtonArrowLeftIcon = res.getDrawable(R.drawable.sym_keyboard_language_arrows_left);
mButtonArrowRightIcon = res.getDrawable(R.drawable.sym_keyboard_language_arrows_right); mButtonArrowRightIcon = res.getDrawable(R.drawable.sym_keyboard_language_arrows_right);
@ -109,7 +104,7 @@ public class LatinKeyboard extends Keyboard {
} }
private void updateSpaceBarForLocale(boolean isAutoCorrection) { private void updateSpaceBarForLocale(boolean isAutoCorrection) {
final Resources res = mRes; final Resources res = mContext.getResources();
// If application locales are explicitly selected. // If application locales are explicitly selected.
if (SubtypeSwitcher.getInstance().needsToDisplayLanguage()) { if (SubtypeSwitcher.getInstance().needsToDisplayLanguage()) {
mSpaceKey.setIcon(new BitmapDrawable(res, mSpaceKey.setIcon(new BitmapDrawable(res,
@ -181,7 +176,7 @@ public class LatinKeyboard extends Keyboard {
final int height = mSpaceIcon.getIntrinsicHeight(); final int height = mSpaceIcon.getIntrinsicHeight();
final Bitmap buffer = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); final Bitmap buffer = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
final Canvas canvas = new Canvas(buffer); final Canvas canvas = new Canvas(buffer);
final Resources res = mRes; final Resources res = mContext.getResources();
canvas.drawColor(res.getColor(R.color.latinkeyboard_transparent), PorterDuff.Mode.CLEAR); canvas.drawColor(res.getColor(R.color.latinkeyboard_transparent), PorterDuff.Mode.CLEAR);
SubtypeSwitcher subtypeSwitcher = SubtypeSwitcher.getInstance(); SubtypeSwitcher subtypeSwitcher = SubtypeSwitcher.getInstance();

View File

@ -0,0 +1,104 @@
/*
* Copyright (C) 2010 Google Inc.
*
* 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.
*/
package com.android.inputmethod.keyboard;
import android.content.Context;
import android.content.res.Resources;
import java.util.List;
public class MiniKeyboardBuilder {
private final Resources mRes;
private final Keyboard mKeyboard;
private final CharSequence[] mPopupCharacters;
private final int mMaxColumns;
private final int mNumRows;
private int mColPos;
private int mRowPos;
private Row mRow;
private int mX;
private int mY;
public MiniKeyboardBuilder(Context context, int layoutTemplateResId, Key popupKey) {
mRes = context.getResources();
mKeyboard = new Keyboard(context, layoutTemplateResId, null);
mPopupCharacters = popupKey.mPopupCharacters;
final int numKeys = mPopupCharacters.length;
final int maxColumns = popupKey.mMaxPopupColumn;
int numRows = numKeys / maxColumns;
if (numKeys % maxColumns != 0) numRows++;
mMaxColumns = maxColumns;
mNumRows = numRows;
// TODO: To determine key width we should pay attention to key label length.
mRow = new Row(mKeyboard, getRowFlags());
if (numRows > 1) {
mColPos = numKeys % maxColumns;
if (mColPos > 0) mColPos = maxColumns - mColPos;
// Centering top-row keys.
mX = mColPos * (mRow.mDefaultWidth + mRow.mDefaultHorizontalGap) / 2;
}
mKeyboard.setMinWidth(0);
}
public Keyboard build() {
List<Key> keys = mKeyboard.getKeys();
for (CharSequence label : mPopupCharacters) {
refresh();
final Key key = new Key(mRes, mRow, label, mX, mY);
keys.add(key);
advance();
}
finish();
return mKeyboard;
}
private int getRowFlags() {
final int rowPos = mRowPos;
int rowFlags = 0;
if (rowPos == 0) rowFlags |= Keyboard.EDGE_TOP;
if (rowPos == mNumRows - 1) rowFlags |= Keyboard.EDGE_BOTTOM;
return rowFlags;
}
private void refresh() {
if (mColPos >= mMaxColumns) {
final Row row = mRow;
// TODO: Allocate key position depending the precedence of popup characters.
mX = 0;
mY += row.mDefaultHeight + row.mVerticalGap;
mColPos = 0;
// TODO: To determine key width we should pay attention to key label length from
// bottom to up for rows.
mRow = new Row(mKeyboard, getRowFlags());
mRowPos++;
}
}
private void advance() {
final Row row = mRow;
final Keyboard keyboard = mKeyboard;
// TODO: Allocate key position depending the precedence of popup characters.
mX += row.mDefaultWidth + row.mDefaultHorizontalGap;
if (mX > keyboard.getMinWidth())
keyboard.setMinWidth(mX);
mColPos++;
}
private void finish() {
mKeyboard.setHeight(mY + mRow.mDefaultHeight);
}
}

View File

@ -0,0 +1,177 @@
/*
* Copyright (C) 2010 Google Inc.
*
* 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.
*/
package com.android.inputmethod.keyboard;
import com.android.inputmethod.latin.R;
import android.content.res.Resources;
import android.graphics.drawable.Drawable;
import android.text.TextUtils;
/**
* String parser of popupCharacters attribute of Key.
* The string is comma separated texts each of which represents one popup key.
* Each popup key text is one of the following:
* - A single letter (Letter)
* - Label optionally followed by keyOutputText or code (keyLabel|keyOutputText).
* - Icon followed by keyOutputText or code (@drawable/icon|@integer/key_code)
* Special character, comma ',' backslash '\', and bar '|' can be escaped by '\'
* character.
* Note that the character '@' and '\' are also parsed by XML parser and CSV parser as well.
*/
public class PopupCharactersParser {
private static final char ESCAPE = '\\';
private static final String LABEL_END = "|";
private static final String PREFIX_AT = "@";
private static final String PREFIX_ICON = PREFIX_AT + "drawable/";
private static final String PREFIX_CODE = PREFIX_AT + "integer/";
private static final int[] DUMMY_CODES = { 0 };
private PopupCharactersParser() {
// Intentional empty constructor for utility class.
}
private static boolean hasIcon(String popupSpec) {
if (popupSpec.startsWith(PREFIX_ICON)) {
final int end = indexOfLabelEnd(popupSpec, 0);
if (end > 0)
return true;
throw new PopupCharactersParserError("outputText or code not specified: " + popupSpec);
}
return false;
}
private static boolean hasCode(String popupSpec) {
final int end = indexOfLabelEnd(popupSpec, 0);
if (end > 0 && end + 1 < popupSpec.length()
&& popupSpec.substring(end + 1).startsWith(PREFIX_CODE)) {
return true;
}
return false;
}
private static String parseEscape(String text) {
if (text.indexOf(ESCAPE) < 0)
return text;
final int length = text.length();
final StringBuilder sb = new StringBuilder();
for (int pos = 0; pos < length; pos++) {
final char c = text.charAt(pos);
if (c == ESCAPE && pos + 1 < length) {
sb.append(text.charAt(++pos));
} else {
sb.append(c);
}
}
return sb.toString();
}
private static int indexOfLabelEnd(String popupSpec, int start) {
if (popupSpec.indexOf(ESCAPE, start) < 0) {
final int end = popupSpec.indexOf(LABEL_END, start);
if (end == 0)
throw new PopupCharactersParserError(LABEL_END + " at " + start + ": " + popupSpec);
return end;
}
final int length = popupSpec.length();
for (int pos = start; pos < length; pos++) {
final char c = popupSpec.charAt(pos);
if (c == ESCAPE && pos + 1 < length) {
pos++;
} else if (popupSpec.startsWith(LABEL_END, pos)) {
return pos;
}
}
return -1;
}
public static String getLabel(String popupSpec) {
if (hasIcon(popupSpec))
return null;
final int end = indexOfLabelEnd(popupSpec, 0);
final String label = (end > 0) ? parseEscape(popupSpec.substring(0, end))
: parseEscape(popupSpec);
if (TextUtils.isEmpty(label))
throw new PopupCharactersParserError("Empty label: " + popupSpec);
return label;
}
public static String getOutputText(String popupSpec) {
if (hasCode(popupSpec))
return null;
final int end = indexOfLabelEnd(popupSpec, 0);
if (end > 0) {
if (indexOfLabelEnd(popupSpec, end + 1) >= 0)
throw new PopupCharactersParserError("Multiple " + LABEL_END + ": "
+ popupSpec);
final String outputText = parseEscape(popupSpec.substring(end + LABEL_END.length()));
if (!TextUtils.isEmpty(outputText))
return outputText;
throw new PopupCharactersParserError("Empty outputText: " + popupSpec);
}
final String label = getLabel(popupSpec);
if (label == null)
throw new PopupCharactersParserError("Empty label: " + popupSpec);
// Code is automatically generated for one letter label. See getCode().
if (label.length() == 1)
return null;
return label;
}
public static int[] getCodes(Resources res, String popupSpec) {
if (hasCode(popupSpec)) {
final int end = indexOfLabelEnd(popupSpec, 0);
if (indexOfLabelEnd(popupSpec, end + 1) >= 0)
throw new PopupCharactersParserError("Multiple " + LABEL_END + ": " + popupSpec);
final int resId = getResourceId(res,
popupSpec.substring(end + LABEL_END.length() + PREFIX_AT.length()));
final int code = res.getInteger(resId);
return new int[] { code };
}
if (indexOfLabelEnd(popupSpec, 0) > 0)
return DUMMY_CODES;
final String label = getLabel(popupSpec);
// Code is automatically generated for one letter label.
if (label != null && label.length() == 1)
return new int[] { label.charAt(0) };
return DUMMY_CODES;
}
public static Drawable getIcon(Resources res, String popupSpec) {
if (hasIcon(popupSpec)) {
int end = popupSpec.indexOf(LABEL_END, PREFIX_ICON.length() + 1);
int resId = getResourceId(res, popupSpec.substring(PREFIX_AT.length(), end));
return res.getDrawable(resId);
}
return null;
}
private static int getResourceId(Resources res, String name) {
String packageName = res.getResourcePackageName(R.string.english_ime_name);
int resId = res.getIdentifier(name, null, packageName);
if (resId == 0)
throw new PopupCharactersParserError("Unknown resource: " + name);
return resId;
}
@SuppressWarnings("serial")
public static class PopupCharactersParserError extends RuntimeException {
public PopupCharactersParserError(String message) {
super(message);
}
}
}

Some files were not shown because too many files have changed in this diff Show More