Merge "UI improvements on tabs, recent expanded card, speed dial grid." into lmp-preview-dev
diff --git a/res/layout/phone_favorite_tile_view.xml b/res/layout/phone_favorite_tile_view.xml
index 1e6b999..d34dc7a 100644
--- a/res/layout/phone_favorite_tile_view.xml
+++ b/res/layout/phone_favorite_tile_view.xml
@@ -17,7 +17,8 @@
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:id="@+id/contact_tile"
     class="com.android.dialer.list.PhoneFavoriteSquareTileView"
-    android:paddingEnd="@dimen/contact_tile_divider_width">
+    android:paddingEnd="@dimen/contact_tile_divider_width"
+    android:paddingBottom="@dimen/contact_tile_divider_width">
 
     <RelativeLayout
         android:id="@+id/contact_favorite_card"
@@ -50,8 +51,6 @@
         <LinearLayout
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:paddingLeft="@dimen/contact_tile_text_side_padding"
-            android:paddingRight="@dimen/contact_tile_text_side_padding"
             android:paddingStart="@dimen/contact_tile_text_side_padding"
             android:paddingEnd="@dimen/contact_tile_text_side_padding"
             android:paddingBottom="@dimen/contact_tile_text_bottom_padding"
diff --git a/res/values/colors.xml b/res/values/colors.xml
index a5ad641..b418897 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -40,7 +40,7 @@
     <color name="item_selected">#660099cc</color>
 
     <!-- Background color of new dialer activity -->
-    <color name="background_dialer_light">#fbfbfb</color>
+    <color name="background_dialer_light">#f6f6f6</color>
     <!-- Background color of dialer list items (contacts, call log entries) -->
     <color name="background_dialer_list_items">@color/background_dialer_light</color>
 
@@ -81,6 +81,7 @@
     <!-- Color of the bottom border below the contacts grid on the main dialer screen. -->
     <color name="contacts_grid_bottom_border_color">#16000000</color>
 
+    <color name="call_log_expanded_background_color">#ffffff</color>
     <!-- Color of actions in expanded call log entries.  This text color represents actions such
          as call back, play voicemail, etc. -->
     <color name="call_log_action_text">#1dc7db</color>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 9162086..53292e1 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -51,7 +51,7 @@
     <item name="contact_tile_height_to_width_ratio" type="dimen">76%</item>
     <dimen name="contact_tile_text_side_padding">12dp</dimen>
     <dimen name="contact_tile_text_bottom_padding">9dp</dimen>
-    <dimen name="favorites_row_top_padding">1dp</dimen>
+    <dimen name="favorites_row_top_padding">2dp</dimen>
     <dimen name="favorites_row_bottom_padding">0dp</dimen>
     <dimen name="favorites_row_start_padding">1dp</dimen>
 
diff --git a/res/values/styles.xml b/res/values/styles.xml
index a9a4843..00c7616 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -141,8 +141,7 @@
            parent="android:style/Widget.Material.Light.ActionBar.TabText">
         <item name="android:textColor">@color/tab_text_color</item>
         <item name="android:textSize">@dimen/tab_text_size</item>
-        <item name="android:fontFamily">@string/tab_font_family</item>
-        <item name="android:textStyle">bold</item>
+        <item name="android:fontFamily">"sans-serif-medium"</item>
     </style>
 
     <style name="ListViewStyle" parent="@android:style/Widget.Material.Light.ListView">
diff --git a/src/com/android/dialer/calllog/CallLogAdapter.java b/src/com/android/dialer/calllog/CallLogAdapter.java
index 924a17f..4ef1977 100644
--- a/src/com/android/dialer/calllog/CallLogAdapter.java
+++ b/src/com/android/dialer/calllog/CallLogAdapter.java
@@ -254,6 +254,10 @@
     private ImageView mBadgeImageView;
     private TextView mBadgeText;
 
+    private int mCallLogBackgroundColor;
+    private int mExpandedBackgroundColor;
+    private float mExpandedTranslationZ;
+
     /** Listener for the primary or secondary actions in the list.
      *  Primary opens the call details.
      *  Secondary calls or plays.
@@ -355,6 +359,9 @@
 
         Resources resources = mContext.getResources();
         CallTypeHelper callTypeHelper = new CallTypeHelper(resources);
+        mCallLogBackgroundColor = resources.getColor(R.color.background_dialer_list_items);
+        mExpandedBackgroundColor = resources.getColor(R.color.call_log_expanded_background_color);
+        mExpandedTranslationZ = resources.getDimension(R.dimen.call_log_expanded_translation_z);
 
         mContactPhotoManager = ContactPhotoManager.getInstance(mContext);
         mPhoneNumberHelper = new PhoneNumberDisplayHelper(resources);
@@ -862,10 +869,8 @@
 
             views.actionsView.setVisibility(View.VISIBLE);
             views.actionsView.setAlpha(1.0f);
-            views.callLogEntryView.setBackgroundColor(
-                    callLogItem.getResources().getColor(R.color.background_dialer_light));
-            callLogItem.setTranslationZ(callLogItem.getResources().getDimension(
-                    R.dimen.call_log_expanded_translation_z));
+            views.callLogEntryView.setBackgroundColor(mExpandedBackgroundColor);
+            callLogItem.setTranslationZ(mExpandedTranslationZ);
 
             // Attempt to give accessibility focus to one of the action buttons.
             // This ensures that a user realizes the expansion occurred.
@@ -882,8 +887,7 @@
                 views.actionsView.setVisibility(View.GONE);
             }
 
-            views.callLogEntryView.setBackgroundColor(
-                    callLogItem.getResources().getColor(R.color.background_dialer_list_items));
+            views.callLogEntryView.setBackgroundColor(mCallLogBackgroundColor);
             callLogItem.setTranslationZ(0);
         }
     }