Update dialpad to new look and feel. DO NOT MERGE.

http://b/13189041

Change-Id: I26b306300e11fd6830d40b51a705c472c89925f4
(cherry picked from commit a389ad358b723ce1725662c79bfc175ddc2e558c)
diff --git a/InCallUI/res/layout/dialpad.xml b/InCallUI/res/layout/dialpad.xml
new file mode 100644
index 0000000..d537e62
--- /dev/null
+++ b/InCallUI/res/layout/dialpad.xml
@@ -0,0 +1,76 @@
+<?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.
+-->
+
+<TableLayout
+    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_gravity="center_horizontal"
+    android:paddingLeft="@dimen/dialpad_horizontal_padding"
+    android:paddingRight="@dimen/dialpad_horizontal_padding"
+    android:background="@color/background_dialpad"
+    android:stretchColumns="*"
+    android:layoutDirection="ltr" >
+
+    <TableRow>
+        <include layout="@layout/dialpad_key" android:id="@+id/one"/>
+        <include layout="@layout/dialpad_key" android:id="@+id/two"/>
+        <include layout="@layout/dialpad_key" android:id="@+id/three"/>
+    </TableRow>
+
+    <TableRow>
+        <include layout="@layout/dialpad_key" android:id="@+id/four"/>
+        <include layout="@layout/dialpad_key" android:id="@+id/five"/>
+        <include layout="@layout/dialpad_key" android:id="@+id/six"/>
+    </TableRow>
+
+    <TableRow>
+        <include layout="@layout/dialpad_key" android:id="@+id/seven"/>
+        <include layout="@layout/dialpad_key" android:id="@+id/eight"/>
+        <include layout="@layout/dialpad_key" android:id="@+id/nine"/>
+    </TableRow>
+
+    <TableRow>
+        <com.android.dialer.dialpad.DialpadKeyButton
+            android:id="@+id/star"
+            style="@style/DialpadKeyButtonStyle">
+            <LinearLayout
+                style="@style/DialpadKeyInternalLayoutStyle">
+                <TextView
+                    android:id="@id/dialpad_key_number"
+                    style="@style/DialpadKeyStarPoundStyle" />
+                <View
+                    android:layout_height="match_parent"
+                    android:layout_width="@dimen/dialpad_key_letters_width" />
+            </LinearLayout>
+        </com.android.dialer.dialpad.DialpadKeyButton>
+        <include layout="@layout/dialpad_key" android:id="@+id/zero"/>
+        <com.android.dialer.dialpad.DialpadKeyButton
+            android:id="@+id/pound"
+            style="@style/DialpadKeyButtonStyle">
+            <LinearLayout
+                style="@style/DialpadKeyInternalLayoutStyle">
+                <TextView
+                    android:id="@id/dialpad_key_number"
+                    style="@style/DialpadKeyStarPoundStyle" />
+                <View
+                    android:layout_height="match_parent"
+                    android:layout_width="@dimen/dialpad_key_letters_width" />
+            </LinearLayout>
+        </com.android.dialer.dialpad.DialpadKeyButton>
+    </TableRow>
+</TableLayout>
diff --git a/InCallUI/res/layout/dialpad_key.xml b/InCallUI/res/layout/dialpad_key.xml
new file mode 100644
index 0000000..180074d
--- /dev/null
+++ b/InCallUI/res/layout/dialpad_key.xml
@@ -0,0 +1,34 @@
+<?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.
+-->
+
+<FrameLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    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 -->
+
+        <TextView
+            android:id="@+id/dialpad_key_number"
+            style="@style/DialpadKeyNumberStyle" />
+
+        <TextView
+            android:id="@+id/dialpad_key_letters"
+            style="@style/DialpadKeyLettersStyle" />
+    </LinearLayout>
+</FrameLayout>
\ No newline at end of file
diff --git a/InCallUI/res/layout/dtmf_twelve_key_dialer_view.xml b/InCallUI/res/layout/dtmf_twelve_key_dialer_view.xml
index fe84010..7240cb1 100644
--- a/InCallUI/res/layout/dtmf_twelve_key_dialer_view.xml
+++ b/InCallUI/res/layout/dtmf_twelve_key_dialer_view.xml
@@ -14,9 +14,7 @@
      limitations under the License.
 -->
 
-<!-- The grid of buttons used in the onscreen DTMF dialpad;
-     see dtmf_twelve_key_dialer_view.xml. -->
-<LinearLayout
+<view class="com.android.incallui.DialpadFragment$DialpadSlidingLinearLayout"
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:id="@+id/dtmf_twelve_key_dialer_view"
     android:layout_width="match_parent"
@@ -24,99 +22,50 @@
     android:orientation="vertical"
     android:layout_marginTop="1dip" >
 
-    <!-- Display of the digits you've typed so far.
-         This widget appears completely non-interactive to the user: you
-         can't edit or "hit backspace" since these are DTMF tones you've
-         already sent over the network.  But it's still an EditText rather
-         than a TextView because it needs to receive key events from a
-         hard keyboard, if present (see mDialerKeyListener). -->
-    <EditText
-        android:id="@+id/dtmfDialerField"
+    <View
+        android:id="@+id/dialpad_spacer"
         android:layout_width="match_parent"
-        android:layout_height="32dp"
-        android:layout_marginTop="10dp"
-        android:layout_marginBottom="5dp"
-        android:layout_marginStart="32dp"
-        android:layout_marginEnd="32dp"
-        android:paddingEnd="16dp"
-        android:paddingStart="16dp"
-        android:singleLine="true"
-        android:scrollHorizontally="true"
-        android:textSize="24sp"
-        android:gravity="center"
-        android:freezesText="true"
-        android:background="@null"
-        android:textColor="@color/dtmf_dialer_display_text"
-        android:focusableInTouchMode="false"
-        android:clickable="false"/>
+        android:layout_height="0dp"
+        android:layout_weight="1"/>
 
-    <TableLayout
-        android:id="@+id/dialpad"
+    <view class="com.android.incallui.DialpadFragment$HoverIgnoringLinearLayout"
+        android:orientation="vertical"
         android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:layout_weight="@integer/dialpad_layout_weight_dialpad"
-        android:layout_gravity="center_horizontal"
-        android:layout_marginTop="@dimen/dialpad_vertical_margin"
-        android:paddingStart="5dip"
-        android:paddingEnd="5dip"
-        android:paddingBottom="10dip"
-        android:background="@color/dialpad_background"
-        android:layoutDirection="ltr">
+        android:layout_height="wrap_content"
+        android:background="@color/background_dialpad">
 
-        <TableRow
-             android:layout_height="0px"
-             android:layout_weight="1">
-            <ImageButton android:id="@+id/one" style="@style/DialpadButtonStyle"
-                android:src="@drawable/dial_num_1_no_vm_wht"
-                android:contentDescription="@string/description_image_button_one" />
-            <ImageButton android:id="@+id/two" style="@style/DialpadButtonStyle"
-                android:src="@drawable/dial_num_2_wht"
-                android:contentDescription="@string/description_image_button_two" />
-            <ImageButton android:id="@+id/three" style="@style/DialpadButtonStyle"
-                android:src="@drawable/dial_num_3_wht"
-                android:contentDescription="@string/description_image_button_three" />
-        </TableRow>
+        <View
+            android:layout_height="@dimen/translucent_shadow_height"
+            android:layout_width="match_parent"
+            android:background="@color/translucent_shadow" />
 
-        <TableRow
-             android:layout_height="0px"
-             android:layout_weight="1">
-            <ImageButton android:id="@+id/four" style="@style/DialpadButtonStyle"
-                android:src="@drawable/dial_num_4_wht"
-                android:contentDescription="@string/description_image_button_four" />
-            <ImageButton android:id="@+id/five" style="@style/DialpadButtonStyle"
-                android:src="@drawable/dial_num_5_wht"
-                android:contentDescription="@string/description_image_button_five" />
-            <ImageButton android:id="@+id/six" style="@style/DialpadButtonStyle"
-                android:src="@drawable/dial_num_6_wht"
-                android:contentDescription="@string/description_image_button_six" />
-        </TableRow>
+        <!-- Display of the digits you've typed so far.
+             This widget appears completely non-interactive to the user: you
+             can't edit or "hit backspace" since these are DTMF tones you've
+             already sent over the network.  But it's still an EditText rather
+             than a TextView because it needs to receive key events from a
+             hard keyboard, if present (see mDialerKeyListener). -->
+        <EditText
+            android:id="@+id/dtmfDialerField"
+            android:layout_width="match_parent"
+            android:layout_height="@dimen/dialpad_digits_height"
+            android:layout_marginTop="10dp"
+            android:layout_marginBottom="5dp"
+            android:layout_marginStart="32dp"
+            android:layout_marginEnd="32dp"
+            android:paddingEnd="16dp"
+            android:paddingStart="16dp"
+            android:singleLine="true"
+            android:scrollHorizontally="true"
+            android:gravity="center"
+            android:freezesText="true"
+            android:background="@color/background_dialpad"
+            android:fontFamily="sans-serif-light"
+            android:textSize="@dimen/dialpad_digits_text_size"
+            android:textColor="@color/dialpad_digits_text_color"
+            android:focusableInTouchMode="false"
+            android:clickable="false"/>
 
-        <TableRow
-             android:layout_height="0px"
-             android:layout_weight="1">
-            <ImageButton android:id="@+id/seven" style="@style/DialpadButtonStyle"
-                android:src="@drawable/dial_num_7_wht"
-                android:contentDescription="@string/description_image_button_seven" />
-            <ImageButton android:id="@+id/eight" style="@style/DialpadButtonStyle"
-                android:src="@drawable/dial_num_8_wht"
-                android:contentDescription="@string/description_image_button_eight" />
-            <ImageButton android:id="@+id/nine" style="@style/DialpadButtonStyle"
-                android:src="@drawable/dial_num_9_wht"
-                android:contentDescription="@string/description_image_button_nine" />
-        </TableRow>
-
-        <TableRow
-             android:layout_height="0px"
-             android:layout_weight="1">
-            <ImageButton android:id="@+id/star" style="@style/DialpadButtonStyle"
-                android:src="@drawable/dial_num_star_wht"
-                android:contentDescription="@string/description_image_button_star" />
-            <ImageButton android:id="@+id/zero" style="@style/DialpadButtonStyle"
-                android:src="@drawable/dial_num_0_no_plus_wht"
-                android:contentDescription="@string/description_image_button_zero" />
-            <ImageButton android:id="@+id/pound" style="@style/DialpadButtonStyle"
-                android:src="@drawable/dial_num_pound_wht"
-                android:contentDescription="@string/description_image_button_pound" />
-        </TableRow>
-    </TableLayout>
-</LinearLayout>
+        <include layout="@layout/dialpad"/>
+    </view>
+</view>