Styling polish to InCallUI.

- Fix clipping of shadow on the end call button.
- Add translation-z to the primary call info.
- Make the dialpad in the InCallUI transparent. This required in
part renaming some constants which were being overriden by Dialer.

Bug: 14108639
Change-Id: I29657fbc9e0b9b4957135e77b2db62159541b43a
diff --git a/InCallUI/res/drawable/dialpad_key_colors.xml b/InCallUI/res/drawable/incall_dialpad_key_colors.xml
similarity index 81%
rename from InCallUI/res/drawable/dialpad_key_colors.xml
rename to InCallUI/res/drawable/incall_dialpad_key_colors.xml
index 27b4d4f..8c8da0b 100644
--- a/InCallUI/res/drawable/dialpad_key_colors.xml
+++ b/InCallUI/res/drawable/incall_dialpad_key_colors.xml
@@ -15,8 +15,6 @@
 -->
 
 <selector xmlns:android="http://schemas.android.com/apk/res/android">
-    <item
-        android:state_pressed="true"
-        android:drawable="@color/background_dialpad_pressed" />
-    <item android:drawable="@color/background_dialpad" />
+    <item android:state_pressed="true"
+        android:drawable="@color/incall_dialpad_background_pressed" />
 </selector>
diff --git a/InCallUI/res/layout/call_card.xml b/InCallUI/res/layout/call_card.xml
index 69c9710..07ecef0 100644
--- a/InCallUI/res/layout/call_card.xml
+++ b/InCallUI/res/layout/call_card.xml
@@ -20,7 +20,7 @@
     android:id="@+id/call_card"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:orientation="vertical">
+    android:orientation="vertical" >
 
     <!-- The main content of the CallCard is either one or two "call info"
          blocks, depending on whether one or two lines are in use.
@@ -44,7 +44,8 @@
             <LinearLayout
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:orientation="vertical" >
+                android:orientation="vertical"
+                android:translationZ="@dimen/primary_call_translation_z" >
 
                 <include android:id="@+id/primary_call_info"
                     layout="@layout/primary_call_info" />
@@ -79,19 +80,20 @@
         </LinearLayout>
 
         <FrameLayout
-            android:layout_width="@dimen/floating_action_button_width"
-            android:layout_height="@dimen/floating_action_button_height"
-            android:layout_marginBottom="@dimen/floating_action_button_margin_bottom"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
             android:layout_gravity="bottom|center">
 
             <ImageButton android:id="@+id/endButton"
-                android:layout_width="match_parent"
-                android:layout_height="match_parent"
+                android:layout_width="@dimen/floating_action_button_width"
+                android:layout_height="@dimen/floating_action_button_height"
+                android:layout_marginBottom="@dimen/end_call_button_margin_bottom"
                 android:background="@drawable/floating_end_button_compound_background"
                 android:src="@drawable/ic_in_call_phone_hangup"
                 android:contentDescription="@string/onscreenEndCallText" />
 
         </FrameLayout>
+
     </FrameLayout>
 
     <!-- Secondary "Call info" block, for the background ("on hold") call. -->
diff --git a/InCallUI/res/layout/dialpad_incall.xml b/InCallUI/res/layout/dialpad_incall.xml
index a5ebb82..9d62203 100644
--- a/InCallUI/res/layout/dialpad_incall.xml
+++ b/InCallUI/res/layout/dialpad_incall.xml
@@ -24,7 +24,6 @@
     android:paddingBottom="@dimen/dialpad_bottom_padding"
     android:paddingLeft="@dimen/dialpad_horizontal_padding"
     android:paddingRight="@dimen/dialpad_horizontal_padding"
-    android:background="@color/background_dialpad"
     android:stretchColumns="*"
     android:layoutDirection="ltr" >
 
diff --git a/InCallUI/res/layout/dtmf_twelve_key_dialer_view.xml b/InCallUI/res/layout/dtmf_twelve_key_dialer_view.xml
index 6bae393..fb3b66e 100644
--- a/InCallUI/res/layout/dtmf_twelve_key_dialer_view.xml
+++ b/InCallUI/res/layout/dtmf_twelve_key_dialer_view.xml
@@ -20,14 +20,13 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:orientation="vertical"
-    android:layout_marginTop="1dip" >
+    android:layout_marginTop="1dip"
+    android:background="@color/incall_dialpad_background" >
 
     <view class="com.android.incallui.DialpadFragment$HoverIgnoringLinearLayout"
         android:orientation="vertical"
         android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:background="@color/background_dialpad">
-
+        android:layout_height="match_parent" >
 
         <!-- Display of the digits you've typed so far.
              This widget appears completely non-interactive to the user: you
@@ -35,6 +34,7 @@
              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). -->
+        <!-- Edit text background is fully transparent to get rid of its underline. -->
         <EditText
             android:id="@+id/dtmfDialerField"
             android:layout_width="match_parent"
@@ -44,13 +44,13 @@
             android:layout_marginBottom="5dp"
             android:layout_marginStart="32dp"
             android:layout_marginEnd="32dp"
+            android:background="@null"
             android:paddingEnd="12dp"
             android:paddingStart="12dp"
             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"
diff --git a/InCallUI/res/values/colors.xml b/InCallUI/res/values/colors.xml
index 0cb767b..fd60bbb 100644
--- a/InCallUI/res/values/colors.xml
+++ b/InCallUI/res/values/colors.xml
@@ -50,11 +50,8 @@
     <!-- Color of dialpad digits -->
     <color name="dialpad_digits_text_color">#000000</color>
 
-    <!-- Background color of dialpad -->
-    <color name="background_dialpad">#ffffff</color>
-
-    <!-- Pressed color of dialpad buttons -->
-    <color name="background_dialpad_pressed">#ececec</color>
+    <color name="incall_dialpad_background">#ccffffff</color>
+    <color name="incall_dialpad_background_pressed">#33ffffff</color>
 
     <!-- Button background color. -->
     <color name="button_background_color">@color/incall_background_color</color>
@@ -65,6 +62,5 @@
     <!-- Secondary color of dialpad text (used for the letters corresponding to each digit -->
     <color name="dialpad_secondary_text_color">#8b8b8b</color>
 
-    <!-- Translucent shadow color -->
     <color name="translucent_shadow">#33999999</color>
 </resources>
diff --git a/InCallUI/res/values/dimens.xml b/InCallUI/res/values/dimens.xml
index e9dd26b..ae5f5a1 100644
--- a/InCallUI/res/values/dimens.xml
+++ b/InCallUI/res/values/dimens.xml
@@ -56,6 +56,9 @@
     <!-- Height of buttons in the extra button row. -->
     <dimen name="extra_row_button_height">@dimen/in_call_button_height</dimen>
 
+    <dimen name="primary_call_translation_z">8dp</dimen>
+
+
     <!-- Padding at the left and right edges of the incall_touch_ui button
          cluster.  This padding is necessary because we can't allow the
          buttons to be very close to the edges of the screen, due to the
@@ -64,7 +67,6 @@
          the prox sensor kick in.) -->
     <dimen name="button_cluster_side_padding">20dp</dimen>
 
-
     <!-- Dimensions for OTA Call Card -->
     <dimen name="otaactivate_layout_marginTop">10dp</dimen>
     <dimen name="otalistenprogress_layout_marginTop">5dp</dimen>
@@ -135,4 +137,6 @@
 
     <!-- Height of translucent shadow effect -->
     <dimen name="translucent_shadow_height">2dp</dimen>
+
+    <dimen name="end_call_button_margin_bottom">15dp</dimen>
 </resources>
diff --git a/InCallUI/res/values/styles.xml b/InCallUI/res/values/styles.xml
index ce93c62..b0f25ec 100644
--- a/InCallUI/res/values/styles.xml
+++ b/InCallUI/res/values/styles.xml
@@ -161,7 +161,7 @@
         <item name="android:clickable">true</item>
         <item name="android:layout_width">match_parent</item>
         <item name="android:layout_height">@dimen/dialpad_key_height</item>
-        <item name="android:background">@drawable/dialpad_key_colors</item>
+        <item name="android:background">@drawable/incall_dialpad_key_colors</item>
         <item name="android:focusable">true</item>
     </style>