Dialpad pixel perfect.
Bug: 5085854
Change-Id: I8f3aeadbe35ba3d4513b5dc68ee1a69f5712fe7b
diff --git a/res/layout/dialpad.xml b/res/layout/dialpad.xml
index e9a95ee..1f74c26 100644
--- a/res/layout/dialpad.xml
+++ b/res/layout/dialpad.xml
@@ -19,13 +19,18 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/dialpad"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
+ android:layout_height="0px"
+ android:layout_weight="0.650"
android:layout_gravity="center_horizontal"
- android:layout_marginTop="4dip"
- android:background="@drawable/dialpad_background"
- android:layout_weight="1">
+ android:layout_marginTop="@dimen/dialpad_vertical_margin"
+ android:paddingLeft="5dip"
+ android:paddingRight="5dip"
+ android:paddingBottom="10dip"
+ android:background="@drawable/dialpad_background">
- <TableRow>
+ <TableRow
+ android:layout_height="0px"
+ android:layout_weight="1">
<ImageButton android:id="@+id/one" style="@style/DialtactsDialpadButtonStyle"
android:src="@drawable/dial_num_1"
android:contentDescription="@string/description_image_button_one" />
@@ -37,7 +42,9 @@
android:contentDescription="@string/description_image_button_three" />
</TableRow>
- <TableRow>
+ <TableRow
+ android:layout_height="0px"
+ android:layout_weight="1">
<ImageButton android:id="@+id/four" style="@style/DialtactsDialpadButtonStyle"
android:src="@drawable/dial_num_4"
android:contentDescription="@string/description_image_button_four" />
@@ -49,7 +56,9 @@
android:contentDescription="@string/description_image_button_six" />
</TableRow>
- <TableRow>
+ <TableRow
+ android:layout_height="0px"
+ android:layout_weight="1">
<ImageButton android:id="@+id/seven" style="@style/DialtactsDialpadButtonStyle"
android:src="@drawable/dial_num_7"
android:contentDescription="@string/description_image_button_seven" />
@@ -61,7 +70,9 @@
android:contentDescription="@string/description_image_button_nine" />
</TableRow>
- <TableRow>
+ <TableRow
+ android:layout_height="0px"
+ android:layout_weight="1">
<ImageButton android:id="@+id/star" style="@style/DialtactsDialpadButtonStyle"
android:src="@drawable/dial_num_star"
android:contentDescription="@string/description_image_button_star" />
@@ -71,6 +82,5 @@
<ImageButton android:id="@+id/pound" style="@style/DialtactsDialpadButtonStyle"
android:src="@drawable/dial_num_pound"
android:contentDescription="@string/description_image_button_pound" />
-
</TableRow>
</TableLayout>
diff --git a/res/layout/dialpad_additional_buttons.xml b/res/layout/dialpad_additional_buttons.xml
index 47a578e..a5e247b 100644
--- a/res/layout/dialpad_additional_buttons.xml
+++ b/res/layout/dialpad_additional_buttons.xml
@@ -18,11 +18,10 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/dialpadAdditionalButtons"
android:layout_width="match_parent"
- android:layout_height="@dimen/dialpad_additional_buttons_height"
+ android:layout_height="0px"
+ android:layout_weight="0.150"
android:layout_gravity="center_horizontal"
- android:layout_marginTop="4dip"
- android:layout_marginBottom="4dip"
- android:layout_weight="0.25"
+ android:layout_marginTop="@dimen/dialpad_vertical_margin"
android:background="@drawable/dialpad_background"
android:orientation="horizontal">
diff --git a/res/layout/dialpad_fragment.xml b/res/layout/dialpad_fragment.xml
index 864dcc7..90d2593 100644
--- a/res/layout/dialpad_fragment.xml
+++ b/res/layout/dialpad_fragment.xml
@@ -19,15 +19,16 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
- android:paddingLeft="4dip"
- android:paddingRight="4dip">
+ android:paddingLeft="@dimen/dialpad_horizontal_margin"
+ android:paddingRight="@dimen/dialpad_horizontal_margin">
<!-- Text field and possibly soft menu button above the keypad where
the digits are displayed. -->
<RelativeLayout
android:layout_width="match_parent"
- android:layout_height="@dimen/dialpad_digits_height"
- android:layout_marginTop="4dip"
+ android:layout_height="0px"
+ android:layout_weight="0.200"
+ android:layout_marginTop="@dimen/dialpad_vertical_margin"
android:gravity="center" >
<!-- Type of this EditText is set to NULL (to disable the IME keyboard)
@@ -45,10 +46,11 @@
android:textColor="?android:attr/textColorPrimary" />
<ImageButton android:id="@+id/overflow_menu"
- android:layout_width="wrap_content"
+ android:layout_width="48dip"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
- android:src="@drawable/ic_menu_overflow" />
+ android:src="@drawable/ic_menu_overflow"
+ android:background="@android:color/transparent"/>
</RelativeLayout>
diff --git a/res/values-long/dimens.xml b/res/values-long/dimens.xml
deleted file mode 100644
index af51d4c..0000000
--- a/res/values-long/dimens.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 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.
--->
-<resources>
- <dimen name="dialpad_digits_height">80dip</dimen>
- <dimen name="dialpad_additional_buttons_height">58dip</dimen>
- <dimen name="dialpad_button_height">70dip</dimen>
-</resources>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 793365c..69441fd 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -194,14 +194,15 @@
<dimen name="group_editor_member_list_height">550dip</dimen>
<!-- Height of edit text in dialpad fragment -->
- <dimen name="dialpad_digits_height">67dip</dimen>
- <dimen name="dialpad_digits_text_size">33sp</dimen>
- <dimen name="dialpad_additional_buttons_height">50dip</dimen>
- <dimen name="dialpad_button_height">50dip</dimen>
+ <dimen name="dialpad_horizontal_margin">4dip</dimen>
+ <dimen name="dialpad_vertical_margin">2dip</dimen>
+ <dimen name="dialpad_digits_text_size">35sp</dimen>
+
<!-- Just used in landscape mode -->
- <dimen name="dialpad_digits_margin_top">1dip</dimen>
- <!-- Just used in landscape mode -->
- <dimen name="dialpad_digits_margin_bottom">50dip</dimen>
+ <dimen name="dialpad_button_height">0px</dimen>
+ <dimen name="dialpad_digits_height">0px</dimen>
+ <dimen name="dialpad_digits_margin_top">0px</dimen>
+ <dimen name="dialpad_digits_margin_bottom">0px</dimen>
<!-- Width of search view in action bar. Use 0dip for MATCH_PARENT -->
<dimen name="search_view_width">0dip</dimen>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 9b60ceb..e6cad61 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -280,7 +280,7 @@
<style name="DialtactsDialpadButtonStyle">
<item name="android:layout_width">0dip</item>
- <item name="android:layout_height">@dimen/dialpad_button_height</item>
+ <item name="android:layout_height">match_parent</item>
<item name="android:layout_weight">1</item>
<item name="android:background">@drawable/btn_dial</item>
<item name="android:soundEffectsEnabled">false</item>