From 8a29e95de37fc2a871f34e98fae5a83713277ff2 Mon Sep 17 00:00:00 2001 From: linyuh Date: Fri, 27 Oct 2017 13:21:38 -0700 Subject: Center align numbers in each column of the dialpad when in landscape mode. No changes are made to the portrait-mode UI. Bug: 30215380 Test: Manual PiperOrigin-RevId: 173710022 Change-Id: I9ef8a57b044e069af2eb886ea6baa30c279f4f70 --- .../dialpadview/res/layout-land/dialpad_key.xml | 39 +++++++++-------- .../res/layout-land/dialpad_key_one.xml | 49 ++++++++++++---------- .../res/layout-land/dialpad_key_pound.xml | 33 +++++++++------ .../res/layout-land/dialpad_key_star.xml | 33 +++++++++------ .../res/layout-land/dialpad_key_zero.xml | 41 +++++++++--------- .../dialer/dialpadview/res/values-land/dimens.xml | 2 - .../dialer/dialpadview/res/values-land/styles.xml | 28 ++++++++++++- 7 files changed, 132 insertions(+), 93 deletions(-) diff --git a/java/com/android/dialer/dialpadview/res/layout-land/dialpad_key.xml b/java/com/android/dialer/dialpadview/res/layout-land/dialpad_key.xml index 941fdb2ec..b126f723f 100644 --- a/java/com/android/dialer/dialpadview/res/layout-land/dialpad_key.xml +++ b/java/com/android/dialer/dialpadview/res/layout-land/dialpad_key.xml @@ -16,29 +16,28 @@ + xmlns:android="http://schemas.android.com/apk/res/android" + style="@style/DialpadKeyButtonStyle"> - - - - + style="@style/DialpadKeyInternalLayoutStyle" + android:layout_gravity="right|center_vertical" + android:baselineAligned="false" + android:orientation="horizontal"> + + + + + android:id="@+id/dialpad_key_letters" + style="@style/DialpadKeyLettersStyle" + android:layout_width="@dimen/dialpad_key_text_width" + android:layout_gravity="center"/> diff --git a/java/com/android/dialer/dialpadview/res/layout-land/dialpad_key_one.xml b/java/com/android/dialer/dialpadview/res/layout-land/dialpad_key_one.xml index 135624681..5023413ae 100644 --- a/java/com/android/dialer/dialpadview/res/layout-land/dialpad_key_one.xml +++ b/java/com/android/dialer/dialpadview/res/layout-land/dialpad_key_one.xml @@ -14,31 +14,36 @@ limitations under the License. --> + xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/one" + style="@style/DialpadKeyButtonStyle"> + - + style="@style/DialpadKeyInternalLayoutStyle" + android:layout_gravity="right|center_vertical" + android:baselineAligned="false" + android:orientation="horizontal"> + + + + + + android:layout_width="@dimen/dialpad_key_text_width" + android:layout_height="wrap_content" + android:layout_gravity="left|center"> + android:id="@+id/dialpad_key_voicemail" + android:layout_width="wrap_content" + android:layout_height="@dimen/dialpad_voicemail_icon_size" + android:scaleType="fitCenter" + android:src="@drawable/quantum_ic_voicemail_white_24" + android:tint="@color/dialpad_voicemail_tint"/> diff --git a/java/com/android/dialer/dialpadview/res/layout-land/dialpad_key_pound.xml b/java/com/android/dialer/dialpadview/res/layout-land/dialpad_key_pound.xml index 98c353128..a3e0c7c14 100644 --- a/java/com/android/dialer/dialpadview/res/layout-land/dialpad_key_pound.xml +++ b/java/com/android/dialer/dialpadview/res/layout-land/dialpad_key_pound.xml @@ -14,20 +14,27 @@ limitations under the License. --> + xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/pound" + style="@style/DialpadKeyButtonStyle"> + - + style="@style/DialpadKeyInternalLayoutStyle" + android:layout_gravity="right|center_vertical" + android:baselineAligned="false" + android:orientation="horizontal"> + + + + + + style="@style/DialpadKeyLettersStyle" + android:layout_width="@dimen/dialpad_key_text_width"/> diff --git a/java/com/android/dialer/dialpadview/res/layout-land/dialpad_key_star.xml b/java/com/android/dialer/dialpadview/res/layout-land/dialpad_key_star.xml index b91c71680..18dc1cb49 100644 --- a/java/com/android/dialer/dialpadview/res/layout-land/dialpad_key_star.xml +++ b/java/com/android/dialer/dialpadview/res/layout-land/dialpad_key_star.xml @@ -14,20 +14,27 @@ limitations under the License. --> + xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/star" + style="@style/DialpadKeyButtonStyle"> + - + style="@style/DialpadKeyInternalLayoutStyle" + android:layout_gravity="right|center_vertical" + android:baselineAligned="false" + android:orientation="horizontal"> + + + + + + style="@style/DialpadKeyLettersStyle" + android:layout_width="@dimen/dialpad_key_text_width"/> diff --git a/java/com/android/dialer/dialpadview/res/layout-land/dialpad_key_zero.xml b/java/com/android/dialer/dialpadview/res/layout-land/dialpad_key_zero.xml index d885ddf05..4c46447d4 100644 --- a/java/com/android/dialer/dialpadview/res/layout-land/dialpad_key_zero.xml +++ b/java/com/android/dialer/dialpadview/res/layout-land/dialpad_key_zero.xml @@ -14,31 +14,30 @@ limitations under the License. --> - + + xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/zero" + style="@style/DialpadKeyButtonStyle"> - - - - + style="@style/DialpadKeyInternalLayoutStyle" + android:layout_gravity="right|center_vertical" + android:baselineAligned="false" + android:orientation="horizontal"> + + + + + android:id="@+id/dialpad_key_letters" + style="@style/DialpadKeyLettersStyle" + android:layout_width="@dimen/dialpad_key_text_width"/> diff --git a/java/com/android/dialer/dialpadview/res/values-land/dimens.xml b/java/com/android/dialer/dialpadview/res/values-land/dimens.xml index 617134ad4..376dbc3ce 100644 --- a/java/com/android/dialer/dialpadview/res/values-land/dimens.xml +++ b/java/com/android/dialer/dialpadview/res/values-land/dimens.xml @@ -16,8 +16,6 @@ --> 5dp - - 3dp 35dp 20sp 0dp diff --git a/java/com/android/dialer/dialpadview/res/values-land/styles.xml b/java/com/android/dialer/dialpadview/res/values-land/styles.xml index f98372509..012cfa2b2 100644 --- a/java/com/android/dialer/dialpadview/res/values-land/styles.xml +++ b/java/com/android/dialer/dialpadview/res/values-land/styles.xml @@ -21,9 +21,33 @@ ?attr/dialpad_text_color_primary ?attr/dialpad_key_numbers_size sans-serif-light - @dimen/dialpad_key_number_width + wrap_content + wrap_content + center + + + + +