Add horizontal edges paddings to phone/number layout

Bug: 4948171
Change-Id: I8a06a25ffcbd141c9418e77e982233166a347914
diff --git a/java/res/values/attrs.xml b/java/res/values/attrs.xml
index cd1b460..1776630 100644
--- a/java/res/values/attrs.xml
+++ b/java/res/values/attrs.xml
@@ -144,19 +144,10 @@
         <!-- Minimum keyboard height represented in pixels, percentage of display height if fraction
              is positive, or percentage of display width if fraction is negative. -->
         <attr name="minKeyboardHeight" format="dimension|fraction" />
-        <!-- Keyboard top and bottom paddings. -->
+        <!-- Keyboard top, bottom, both horizontal edges paddings. -->
         <attr name="keyboardTopPadding" format="dimension|fraction" />
         <attr name="keyboardBottomPadding" format="dimension|fraction" />
-        <!-- Default width of a key, in pixels or percentage of display width.
-             If the value is zero, the actual key width will be determined to fill out the area up
-             to the right edge of the keyboard.
-             If the value is negative, the actual key width will be determined to fill out the
-             area between the nearest key on the left hand side and the right edge of the keyboard.
-             -->
-        <attr name="keyWidth" format="dimension|fraction|enum">
-            <enum name="fillRight" value="-1" />
-            <enum name="fillBoth" value="-2" />
-        </attr>
+        <attr name="keyboardHorizontalEdgesPadding" format="dimension|fraction" />
         <!-- Default height of a row (key height + vertical gap), in pixels or percentage of
              keyboard height. -->
         <attr name="rowHeight" format="dimension|fraction" />
@@ -258,6 +249,17 @@
         <!-- Visual insets -->
         <attr name="visualInsetsLeft" format="dimension|fraction" />
         <attr name="visualInsetsRight" format="dimension|fraction" />
+        <!-- Width of the key, in pixels or percentage of display width.
+             If the value is fillRight, the actual key width will be determined to fill out the area
+             up to the right edge of the keyboard.
+             If the value is fillBoth, the actual key width will be determined to fill out the
+             area between the nearest key on the left hand side and the right edge of the keyboard.
+             -->
+        <!-- This should be aligned with KeyboardBuilder.Row.KEYWIDTH_* -->
+        <attr name="keyWidth" format="dimension|fraction|enum">
+            <enum name="fillRight" value="-1" />
+            <enum name="fillBoth" value="-2" />
+        </attr>
         <!-- The X-coordinate of upper right corner of this key including horizontal gap.
              If the value is negative, the origin is the right edge of the keyboard. -->
         <attr name="keyXPos" format="dimension|fraction" />
diff --git a/java/res/values/dimens.xml b/java/res/values/dimens.xml
index cbd557e..8b4cd6d 100644
--- a/java/res/values/dimens.xml
+++ b/java/res/values/dimens.xml
@@ -29,9 +29,9 @@
     <dimen name="mini_keyboard_horizontal_edges_padding">16dip</dimen>
     <dimen name="mini_keyboard_key_horizontal_padding">8dip</dimen>
 
-    <dimen name="keyboard_horizontal_edges_padding">0dp</dimen>
     <fraction name="keyboard_top_padding">1.556%p</fraction>
     <fraction name="keyboard_bottom_padding">4.669%p</fraction>
+    <fraction name="keyboard_horizontal_edges_padding">0%p</fraction>
     <fraction name="key_bottom_gap">6.250%p</fraction>
     <fraction name="key_horizontal_gap">1.352%p</fraction>
 
diff --git a/java/res/values/styles.xml b/java/res/values/styles.xml
index 7b8bfa8..c6ea2a5 100644
--- a/java/res/values/styles.xml
+++ b/java/res/values/styles.xml
@@ -24,6 +24,7 @@
         <item name="moreKeysTemplate">@xml/kbd_mini_keyboard_template</item>
         <item name="keyboardTopPadding">@fraction/keyboard_top_padding</item>
         <item name="keyboardBottomPadding">@fraction/keyboard_bottom_padding</item>
+        <item name="keyboardHorizontalEdgesPadding">@fraction/keyboard_horizontal_edges_padding</item>
         <item name="horizontalGap">@fraction/key_horizontal_gap</item>
         <item name="verticalGap">@fraction/key_bottom_gap</item>
         <item name="maxMoreKeysColumn">@integer/config_max_more_keys_column</item>