Add horizontal edges paddings to phone/number layout
Bug: 4948171
Change-Id: I8a06a25ffcbd141c9418e77e982233166a347914
diff --git a/java/res/xml/kbd_number.xml b/java/res/xml/kbd_number.xml
index aabf0eb..38dd6bf 100644
--- a/java/res/xml/kbd_number.xml
+++ b/java/res/xml/kbd_number.xml
@@ -23,109 +23,5 @@
latin:keyWidth="26.67%p"
>
<include
- latin:keyboardLayout="@xml/kbd_key_styles" />
- <include
- latin:keyboardLayout="@xml/kbd_numkey_styles" />
- <switch>
- <case
- latin:passwordInput="true"
- >
- <Row>
- <Key
- latin:keyStyle="num1KeyStyle" />
- <Key
- latin:keyStyle="num2KeyStyle" />
- <Key
- latin:keyStyle="num3KeyStyle" />
- </Row>
- <Row>
- <Key
- latin:keyStyle="num4KeyStyle" />
- <Key
- latin:keyStyle="num5KeyStyle" />
- <Key
- latin:keyStyle="num6KeyStyle" />
- </Row>
- <Row>
- <Key
- latin:keyStyle="num7KeyStyle" />
- <Key
- latin:keyStyle="num8KeyStyle" />
- <Key
- latin:keyStyle="num9KeyStyle" />
- <Key
- latin:keyStyle="deleteKeyStyle"
- latin:keyWidth="fillRight" />
- </Row>
- <Row>
- <Spacer />
- <Key
- latin:keyStyle="num0KeyStyle" />
- <Spacer />
- <Key
- latin:keyStyle="returnKeyStyle"
- latin:keyWidth="fillRight" />
- </Row>
- </case>
- <!-- latin:passwordInput="false" -->
- <default>
- <Row>
- <Key
- latin:keyLabel="1"
- latin:keyStyle="numKeyStyle" />
- <Key
- latin:keyLabel="2"
- latin:keyStyle="numKeyStyle" />
- <Key
- latin:keyLabel="3"
- latin:keyStyle="numKeyStyle" />
- <Key
- latin:keyLabel="-"
- latin:keyStyle="numFunctionalKeyStyle"
- latin:keyWidth="fillRight" />
- </Row>
- <Row>
- <Key
- latin:keyLabel="4"
- latin:keyStyle="numKeyStyle" />
- <Key
- latin:keyLabel="5"
- latin:keyStyle="numKeyStyle" />
- <Key
- latin:keyLabel="6"
- latin:keyStyle="numKeyStyle" />
- <Key
- latin:keyLabel=","
- latin:keyStyle="numFunctionalKeyStyle"
- latin:keyWidth="fillRight" />
- </Row>
- <Row>
- <Key
- latin:keyLabel="7"
- latin:keyStyle="numKeyStyle" />
- <Key
- latin:keyLabel="8"
- latin:keyStyle="numKeyStyle"/>
- <Key
- latin:keyLabel="9"
- latin:keyStyle="numKeyStyle" />
- <Key
- latin:keyStyle="deleteKeyStyle"
- latin:keyWidth="fillRight" />
- </Row>
- <Row>
- <Key
- latin:keyStyle="numSpaceKeyStyle" />
- <Key
- latin:keyLabel="0"
- latin:keyStyle="numKeyStyle" />
- <Key
- latin:keyLabel="."
- latin:keyStyle="numKeyStyle" />
- <Key
- latin:keyStyle="returnKeyStyle"
- latin:keyWidth="fillRight" />
- </Row>
- </default>
- </switch>
+ latin:keyboardLayout="@xml/kbd_rows_number" />
</Keyboard>
diff --git a/java/res/xml/kbd_phone.xml b/java/res/xml/kbd_phone.xml
index 4588ab2..b550f17 100644
--- a/java/res/xml/kbd_phone.xml
+++ b/java/res/xml/kbd_phone.xml
@@ -1,19 +1,19 @@
<?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
+** 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
+** 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
+** 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.
*/
-->
@@ -23,53 +23,5 @@
latin:keyWidth="26.67%p"
>
<include
- latin:keyboardLayout="@xml/kbd_key_styles" />
- <include
- latin:keyboardLayout="@xml/kbd_numkey_styles" />
- <Row>
- <Key
- latin:keyStyle="num1KeyStyle" />
- <Key
- latin:keyStyle="num2KeyStyle" />
- <Key
- latin:keyStyle="num3KeyStyle" />
- <Key
- latin:keyLabel="-"
- latin:keyStyle="numFunctionalKeyStyle"
- latin:keyWidth="fillRight" />
- </Row>
- <Row>
- <Key
- latin:keyStyle="num4KeyStyle" />
- <Key
- latin:keyStyle="num5KeyStyle" />
- <Key
- latin:keyStyle="num6KeyStyle" />
- <Key
- latin:keyLabel="."
- latin:keyStyle="numFunctionalKeyStyle"
- latin:keyWidth="fillRight" />
- </Row>
- <Row>
- <Key
- latin:keyStyle="num7KeyStyle" />
- <Key
- latin:keyStyle="num8KeyStyle" />
- <Key
- latin:keyStyle="num9KeyStyle" />
- <Key
- latin:keyStyle="deleteKeyStyle"
- latin:keyWidth="fillRight" />
- </Row>
- <Row>
- <Key
- latin:keyStyle="numSwitchToAltKeyStyle" />
- <Key
- latin:keyStyle="num0KeyStyle" />
- <Key
- latin:keyStyle="numSpaceKeyStyle" />
- <Key
- latin:keyStyle="returnKeyStyle"
- latin:keyWidth="fillRight" />
- </Row>
+ latin:keyboardLayout="@xml/kbd_rows_phone" />
</Keyboard>
diff --git a/java/res/xml/kbd_phone_shift.xml b/java/res/xml/kbd_phone_shift.xml
index 5be9bf9..eea823f 100644
--- a/java/res/xml/kbd_phone_shift.xml
+++ b/java/res/xml/kbd_phone_shift.xml
@@ -1,19 +1,19 @@
<?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
+** 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
+** 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
+** 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.
*/
-->
@@ -23,66 +23,5 @@
latin:keyWidth="26.67%p"
>
<include
- latin:keyboardLayout="@xml/kbd_key_styles" />
- <include
- latin:keyboardLayout="@xml/kbd_numkey_styles" />
- <Row>
- <Key
- latin:keyLabel="("
- latin:keyStyle="numKeyStyle" />
- <Key
- latin:keyLabel="/"
- latin:keyStyle="numKeyStyle" />
- <Key
- latin:keyLabel=")"
- latin:keyStyle="numKeyStyle" />
- <Key
- latin:keyLabel="-"
- latin:keyStyle="numFunctionalKeyStyle"
- latin:keyWidth="fillRight" />
- </Row>
- <Row>
- <Key
- latin:keyLabel="N" />
- <!-- Pause is a comma. Check PhoneNumberUtils.java to see if this
- has changed. -->
- <Key
- latin:code="44"
- latin:keyLabel="@string/label_pause_key"
- latin:keyLabelOption="followKeyHintLabelRatio|autoXScale" />
- <Key
- latin:keyLabel=","
- latin:keyStyle="numKeyStyle" />
- <Key
- latin:keyLabel="."
- latin:keyStyle="numFunctionalKeyStyle"
- latin:keyWidth="fillRight" />
- </Row>
- <Row>
- <Key
- latin:keyStyle="numStarKeyStyle" />
- <!-- Wait is a semicolon. -->
- <Key
- latin:code="59"
- latin:keyLabel="@string/label_wait_key"
- latin:keyLabelOption="followKeyHintLabelRatio|autoXScale" />
- <Key
- latin:keyLabel="#"
- latin:keyStyle="numKeyStyle" />
- <Key
- latin:keyStyle="deleteKeyStyle"
- latin:keyWidth="fillRight" />
- </Row>
- <Row>
- <Key
- latin:keyStyle="numSwitchToNumericKeyStyle" />
- <Key
- latin:keyLabel="+"
- latin:keyStyle="numKeyStyle" />
- <Key
- latin:keyStyle="numSpaceKeyStyle" />
- <Key
- latin:keyStyle="returnKeyStyle"
- latin:keyWidth="fillRight" />
- </Row>
+ latin:keyboardLayout="@xml/kbd_rows_phone_shift" />
</Keyboard>
diff --git a/java/res/xml/kbd_rows_number.xml b/java/res/xml/kbd_rows_number.xml
new file mode 100644
index 0000000..21d0656
--- /dev/null
+++ b/java/res/xml/kbd_rows_number.xml
@@ -0,0 +1,130 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2011, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<merge
+ xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
+>
+ <include
+ latin:keyboardLayout="@xml/kbd_key_styles" />
+ <include
+ latin:keyboardLayout="@xml/kbd_numkey_styles" />
+ <switch>
+ <case
+ latin:passwordInput="true"
+ >
+ <Row>
+ <Key
+ latin:keyStyle="num1KeyStyle" />
+ <Key
+ latin:keyStyle="num2KeyStyle" />
+ <Key
+ latin:keyStyle="num3KeyStyle" />
+ </Row>
+ <Row>
+ <Key
+ latin:keyStyle="num4KeyStyle" />
+ <Key
+ latin:keyStyle="num5KeyStyle" />
+ <Key
+ latin:keyStyle="num6KeyStyle" />
+ </Row>
+ <Row>
+ <Key
+ latin:keyStyle="num7KeyStyle" />
+ <Key
+ latin:keyStyle="num8KeyStyle" />
+ <Key
+ latin:keyStyle="num9KeyStyle" />
+ <Key
+ latin:keyStyle="deleteKeyStyle"
+ latin:keyWidth="fillRight" />
+ </Row>
+ <Row>
+ <Spacer />
+ <Key
+ latin:keyStyle="num0KeyStyle" />
+ <Spacer />
+ <Key
+ latin:keyStyle="returnKeyStyle"
+ latin:keyWidth="fillRight" />
+ </Row>
+ </case>
+ <!-- latin:passwordInput="false" -->
+ <default>
+ <Row>
+ <Key
+ latin:keyLabel="1"
+ latin:keyStyle="numKeyStyle" />
+ <Key
+ latin:keyLabel="2"
+ latin:keyStyle="numKeyStyle" />
+ <Key
+ latin:keyLabel="3"
+ latin:keyStyle="numKeyStyle" />
+ <Key
+ latin:keyLabel="-"
+ latin:keyStyle="numFunctionalKeyStyle"
+ latin:keyWidth="fillRight" />
+ </Row>
+ <Row>
+ <Key
+ latin:keyLabel="4"
+ latin:keyStyle="numKeyStyle" />
+ <Key
+ latin:keyLabel="5"
+ latin:keyStyle="numKeyStyle" />
+ <Key
+ latin:keyLabel="6"
+ latin:keyStyle="numKeyStyle" />
+ <Key
+ latin:keyLabel=","
+ latin:keyStyle="numFunctionalKeyStyle"
+ latin:keyWidth="fillRight" />
+ </Row>
+ <Row>
+ <Key
+ latin:keyLabel="7"
+ latin:keyStyle="numKeyStyle" />
+ <Key
+ latin:keyLabel="8"
+ latin:keyStyle="numKeyStyle"/>
+ <Key
+ latin:keyLabel="9"
+ latin:keyStyle="numKeyStyle" />
+ <Key
+ latin:keyStyle="deleteKeyStyle"
+ latin:keyWidth="fillRight" />
+ </Row>
+ <Row>
+ <Key
+ latin:keyStyle="numSpaceKeyStyle" />
+ <Key
+ latin:keyLabel="0"
+ latin:keyStyle="numKeyStyle" />
+ <Key
+ latin:keyLabel="."
+ latin:keyStyle="numKeyStyle" />
+ <Key
+ latin:keyStyle="returnKeyStyle"
+ latin:keyWidth="fillRight" />
+ </Row>
+ </default>
+ </switch>
+</merge>
diff --git a/java/res/xml/kbd_rows_phone.xml b/java/res/xml/kbd_rows_phone.xml
new file mode 100644
index 0000000..5500a60
--- /dev/null
+++ b/java/res/xml/kbd_rows_phone.xml
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2011, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<merge
+ xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
+>
+ <include
+ latin:keyboardLayout="@xml/kbd_key_styles" />
+ <include
+ latin:keyboardLayout="@xml/kbd_numkey_styles" />
+ <Row>
+ <Key
+ latin:keyStyle="num1KeyStyle" />
+ <Key
+ latin:keyStyle="num2KeyStyle" />
+ <Key
+ latin:keyStyle="num3KeyStyle" />
+ <Key
+ latin:keyLabel="-"
+ latin:keyStyle="numFunctionalKeyStyle"
+ latin:keyWidth="fillRight" />
+ </Row>
+ <Row>
+ <Key
+ latin:keyStyle="num4KeyStyle" />
+ <Key
+ latin:keyStyle="num5KeyStyle" />
+ <Key
+ latin:keyStyle="num6KeyStyle" />
+ <Key
+ latin:keyLabel="."
+ latin:keyStyle="numFunctionalKeyStyle"
+ latin:keyWidth="fillRight" />
+ </Row>
+ <Row>
+ <Key
+ latin:keyStyle="num7KeyStyle" />
+ <Key
+ latin:keyStyle="num8KeyStyle" />
+ <Key
+ latin:keyStyle="num9KeyStyle" />
+ <Key
+ latin:keyStyle="deleteKeyStyle"
+ latin:keyWidth="fillRight" />
+ </Row>
+ <Row>
+ <Key
+ latin:keyStyle="numSwitchToAltKeyStyle" />
+ <Key
+ latin:keyStyle="num0KeyStyle" />
+ <Key
+ latin:keyStyle="numSpaceKeyStyle" />
+ <Key
+ latin:keyStyle="returnKeyStyle"
+ latin:keyWidth="fillRight" />
+ </Row>
+</merge>
diff --git a/java/res/xml/kbd_rows_phone_shift.xml b/java/res/xml/kbd_rows_phone_shift.xml
new file mode 100644
index 0000000..3c283d3
--- /dev/null
+++ b/java/res/xml/kbd_rows_phone_shift.xml
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2011, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<merge
+ xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
+>
+ <include
+ latin:keyboardLayout="@xml/kbd_key_styles" />
+ <include
+ latin:keyboardLayout="@xml/kbd_numkey_styles" />
+ <Row>
+ <Key
+ latin:keyLabel="("
+ latin:keyStyle="numKeyStyle" />
+ <Key
+ latin:keyLabel="/"
+ latin:keyStyle="numKeyStyle" />
+ <Key
+ latin:keyLabel=")"
+ latin:keyStyle="numKeyStyle" />
+ <Key
+ latin:keyLabel="-"
+ latin:keyStyle="numFunctionalKeyStyle"
+ latin:keyWidth="fillRight" />
+ </Row>
+ <Row>
+ <Key
+ latin:keyLabel="N" />
+ <!-- Pause is a comma. Check PhoneNumberUtils.java to see if this
+ has changed. -->
+ <Key
+ latin:code="44"
+ latin:keyLabel="@string/label_pause_key"
+ latin:keyLabelOption="followKeyHintLabelRatio|autoXScale" />
+ <Key
+ latin:keyLabel=","
+ latin:keyStyle="numKeyStyle" />
+ <Key
+ latin:keyLabel="."
+ latin:keyStyle="numFunctionalKeyStyle"
+ latin:keyWidth="fillRight" />
+ </Row>
+ <Row>
+ <Key
+ latin:keyStyle="numStarKeyStyle" />
+ <!-- Wait is a semicolon. -->
+ <Key
+ latin:code="59"
+ latin:keyLabel="@string/label_wait_key"
+ latin:keyLabelOption="followKeyHintLabelRatio|autoXScale" />
+ <Key
+ latin:keyLabel="#"
+ latin:keyStyle="numKeyStyle" />
+ <Key
+ latin:keyStyle="deleteKeyStyle"
+ latin:keyWidth="fillRight" />
+ </Row>
+ <Row>
+ <Key
+ latin:keyStyle="numSwitchToNumericKeyStyle" />
+ <Key
+ latin:keyLabel="+"
+ latin:keyStyle="numKeyStyle" />
+ <Key
+ latin:keyStyle="numSpaceKeyStyle" />
+ <Key
+ latin:keyStyle="returnKeyStyle"
+ latin:keyWidth="fillRight" />
+ </Row>
+</merge>