summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNancy Chen <nancychen@google.com>2014-07-29 14:34:52 -0700
committerNancy Chen <nancychen@google.com>2014-07-29 14:39:07 -0700
commit9764a8206a5b5771e13fdfaaf467adbe5d3a8b24 (patch)
tree37f635c415ee004f3c2b2a185928cdeb63058980
parentf4d66dc977378701fcb26bef879da0d457dde956 (diff)
downloadandroid_packages_apps_PhoneCommon-9764a8206a5b5771e13fdfaaf467adbe5d3a8b24.tar.gz
android_packages_apps_PhoneCommon-9764a8206a5b5771e13fdfaaf467adbe5d3a8b24.tar.bz2
android_packages_apps_PhoneCommon-9764a8206a5b5771e13fdfaaf467adbe5d3a8b24.zip
Shift padding between letters and numbers move overflow icon left.
Increase padding between numbers and subtext for all numbers except zero and "+" which decrease the margin. Also move overflow icon to the left. Bug: 16655840 Change-Id: Ic5187e0c82eb2433a89165d201e8d406b6d0d5a4
-rw-r--r--res/layout/dialpad.xml4
-rw-r--r--res/layout/dialpad_key_zero.xml37
-rw-r--r--res/layout/dialpad_view.xml2
-rw-r--r--res/values/dimens.xml5
-rw-r--r--res/values/styles.xml4
5 files changed, 47 insertions, 5 deletions
diff --git a/res/layout/dialpad.xml b/res/layout/dialpad.xml
index 1fc1f6c..6368279 100644
--- a/res/layout/dialpad.xml
+++ b/res/layout/dialpad.xml
@@ -90,9 +90,7 @@
style="@style/DialpadKeyStarStyle" />
</LinearLayout>
</com.android.phone.common.dialpad.DialpadKeyButton>
- <include layout="@layout/dialpad_key"
- android:id="@+id/zero"
- style="@style/DialpadKeyButtonStyle" />
+ <include layout="@layout/dialpad_key_zero" />
<com.android.phone.common.dialpad.DialpadKeyButton
android:id="@+id/pound"
style="@style/DialpadKeyButtonStyle">
diff --git a/res/layout/dialpad_key_zero.xml b/res/layout/dialpad_key_zero.xml
new file mode 100644
index 0000000..11805f1
--- /dev/null
+++ b/res/layout/dialpad_key_zero.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014 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.
+-->
+
+<!-- A layout representing the zero key in the dialpad, with the plus sign shifted up because it is
+ smaller than a regular letter -->
+<com.android.phone.common.dialpad.DialpadKeyButton
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/zero"
+ style="@style/DialpadKeyButtonStyle" >
+
+ <LinearLayout style="@style/DialpadKeyInternalLayoutStyle">
+
+ <!-- Note in the referenced styles that we assign hard widths to these components
+ because we want them to line up vertically when we arrange them in an MxN grid -->
+
+ <com.android.phone.common.dialpad.DialpadTextView
+ android:id="@+id/dialpad_key_number"
+ style="@style/DialpadBottomKeyNumberStyle" />
+
+ <TextView
+ android:id="@+id/dialpad_key_letters"
+ style="@style/DialpadKeyLettersStyle" />
+ </LinearLayout>
+</com.android.phone.common.dialpad.DialpadKeyButton>
diff --git a/res/layout/dialpad_view.xml b/res/layout/dialpad_view.xml
index c7413b0..1552ab3 100644
--- a/res/layout/dialpad_view.xml
+++ b/res/layout/dialpad_view.xml
@@ -39,7 +39,7 @@
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_margin="@dimen/dialpad_overflow_margin"
- android:paddingLeft="@dimen/dialpad_digits_padding"
+ android:paddingLeft="@dimen/dialpad_digits_menu_left_padding"
android:paddingRight="@dimen/dialpad_digits_menu_right_padding"
android:contentDescription="@string/description_dialpad_overflow"
android:gravity="center"
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index a3e04c2..58dd5a5 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -21,7 +21,9 @@
<dimen name="dialpad_key_pound_size">23sp</dimen>
<dimen name="dialpad_key_star_size">28sp</dimen>
<dimen name="dialpad_key_height">64dp</dimen>
- <dimen name="dialpad_key_number_margin_bottom">2dp</dimen>
+ <dimen name="dialpad_key_number_margin_bottom">3dp</dimen>
+ <!-- Zero key should have less space between self and text because "+" is smaller -->
+ <dimen name="dialpad_zero_key_number_margin_bottom">1dp</dimen>
<dimen name="dialpad_symbol_margin_bottom">13dp</dimen>
<!-- The bottom row of the dialpad is slightly taller to account for the dial button -->
<dimen name="dialpad_bottom_key_height">65dp</dimen>
@@ -31,6 +33,7 @@
<dimen name="dialpad_digits_text_min_size">24sp</dimen>
<dimen name="dialpad_digits_height">64dp</dimen>
<dimen name="dialpad_digits_padding">16dp</dimen>
+ <dimen name="dialpad_digits_menu_left_padding">8dp</dimen>
<dimen name="dialpad_digits_menu_right_padding">10dp</dimen>
<dimen name="dialpad_center_margin">3dp</dimen>
<dimen name="dialpad_button_margin">2dp</dimen>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 5297aa1..4631a09 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -31,6 +31,10 @@
<item name="android:gravity">center</item>
</style>
+ <style name="DialpadBottomKeyNumberStyle" parent="DialpadKeyNumberStyle">
+ <item name="android:layout_marginBottom">@dimen/dialpad_zero_key_number_margin_bottom</item>
+ </style>
+
<style name="DialpadKeyStarStyle">
<item name="android:textColor">@color/dialpad_secondary_text_color</item>
<item name="android:textSize">@dimen/dialpad_key_star_size</item>