Merge "Add ActionBarController" into lmp-preview-dev
diff --git a/res/drawable-hdpi/ic_arrow_back_24dp.png b/res/drawable-hdpi/ic_arrow_back_24dp.png
new file mode 100644
index 0000000..86cb894
--- /dev/null
+++ b/res/drawable-hdpi/ic_arrow_back_24dp.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_back_arrow.png b/res/drawable-hdpi/ic_back_arrow.png
deleted file mode 100644
index aad4f36..0000000
--- a/res/drawable-hdpi/ic_back_arrow.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_arrow_back_24dp.png b/res/drawable-mdpi/ic_arrow_back_24dp.png
new file mode 100644
index 0000000..dc81cd1
--- /dev/null
+++ b/res/drawable-mdpi/ic_arrow_back_24dp.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_back_arrow.png b/res/drawable-mdpi/ic_back_arrow.png
deleted file mode 100644
index 56eb887..0000000
--- a/res/drawable-mdpi/ic_back_arrow.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_arrow_back_24dp.png b/res/drawable-xhdpi/ic_arrow_back_24dp.png
new file mode 100644
index 0000000..4f4fbaa
--- /dev/null
+++ b/res/drawable-xhdpi/ic_arrow_back_24dp.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_back_arrow.png b/res/drawable-xhdpi/ic_back_arrow.png
deleted file mode 100644
index 9d46e3d..0000000
--- a/res/drawable-xhdpi/ic_back_arrow.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_arrow_back_24dp.png b/res/drawable-xxhdpi/ic_arrow_back_24dp.png
new file mode 100644
index 0000000..46e90f7
--- /dev/null
+++ b/res/drawable-xxhdpi/ic_arrow_back_24dp.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_back_arrow.png b/res/drawable-xxhdpi/ic_back_arrow.png
deleted file mode 100644
index 66b6e35..0000000
--- a/res/drawable-xxhdpi/ic_back_arrow.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/ic_back_arrow.xml b/res/drawable/ic_back_arrow.xml
new file mode 100644
index 0000000..68a875d
--- /dev/null
+++ b/res/drawable/ic_back_arrow.xml
@@ -0,0 +1,20 @@
+<?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
+  -->
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+        android:src="@drawable/ic_arrow_back_24dp"
+        android:autoMirrored="true"
+        android:tint="@color/actionbar_icon_color" />
\ No newline at end of file
diff --git a/res/layout/lists_fragment.xml b/res/layout/lists_fragment.xml
index d75095a..7e15f84 100644
--- a/res/layout/lists_fragment.xml
+++ b/res/layout/lists_fragment.xml
@@ -24,7 +24,7 @@
         android:id="@+id/shortcut_card_list"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:paddingTop="?android:attr/actionBarSize"
+        android:paddingTop="@dimen/action_bar_height"
         android:background="@color/actionbar_background_color"
         android:clipToPadding="false"
         android:fadingEdge="none"
diff --git a/res/values-land/styles.xml b/res/values-land/styles.xml
deleted file mode 100644
index 1388a17..0000000
--- a/res/values-land/styles.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<!--
-  Copyright (C) 2012 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>
-
-    <style name="FragmentActionBarPadding">
-        <item name="android:paddingBottom">0dp</item>
-    </style>
-</resources>
diff --git a/res/values/colors.xml b/res/values/colors.xml
index e064144..d43f30a 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -67,6 +67,8 @@
     <!-- Color of the contact name in favorite tiles -->
     <color name="contact_tile_name_color">#ffffff</color>
 
+    <color name="contact_list_name_text_color">#4d4d4d</color>
+
     <!-- Undo dialogue color -->
     <color name="undo_dialogue_text_color">#4d4d4d</color>
 
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 78d91c2..e884566 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -88,12 +88,16 @@
     <!-- Height of the all contacts Button in the favorites menu. -->
     <dimen name="favorites_menu_all_contacts_height">24dp</dimen>
 
+    <!-- Height of the actionBar - this is 8dps bigger than the platform standard to give more
+    room to the search box-->
+    <dimen name="action_bar_height">64dp</dimen>
+
     <!-- Margin to the left and right of the search box. -->
     <dimen name="search_margin_horizontal">7dp</dimen>
     <!-- Margin above the search box. -->
-    <dimen name="search_top_margin">4dp</dimen>
+    <dimen name="search_top_margin">8dp</dimen>
     <!-- Margin below the search box. -->
-    <dimen name="search_bottom_margin">4dp</dimen>
+    <dimen name="search_bottom_margin">8dp</dimen>
     <!-- Search box text size -->
     <dimen name="search_text_size">13.24sp</dimen>
     <!-- Search box interior padding - left -->
@@ -108,7 +112,7 @@
     <!-- Size of the icon (voice search, close search) in the search box. -->
     <dimen name="search_box_icon_size">28dp</dimen>
     <!-- Elevation of the search box -->
-    <dimen name="search_box_elevation">10dp</dimen>
+    <dimen name="search_box_elevation">5dp</dimen>
 
     <!-- Size of text in tabs. -->
     <dimen name="tab_height">43dp</dimen>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 659d5ab..e84f4b5 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -22,14 +22,10 @@
         <item name="android:windowActionBarOverlay">true</item>
         <item name="android:windowActionModeOverlay">true</item>
         <item name="android:actionBarStyle">@style/DialtactsActionBarStyle</item>
-        <!-- Style for the tabs (for the tabs) -->
-        <item name="android:actionBarTabStyle">@style/DialtactsActionBarTabStyle</item>
-        <!-- Style for the tab bar (for the divider between tabs) -->
-        <item name="android:actionBarTabBarStyle">@style/DialtactsActionBarTabBarStyle</item>
-        <!-- Style for the tab bar text (for text on tabs) -->
-        <item name="android:actionBarTabTextStyle">@style/DialtactsActionBarTabTextStyle</item>
         <!-- Style for the overflow button in the actionbar. -->
         <item name="android:actionOverflowButtonStyle">@style/DialtactsActionBarOverflow</item>
+        <!--  Drawable for the back button -->
+        <item name="android:homeAsUpIndicator">@drawable/ic_back_arrow</item>
         <item name="android:windowContentOverlay">@null</item>
         <!--  Searchbox Style -->
         <item name="android:editTextStyle">@style/DialtactsSearchboxStyle</item>
@@ -58,6 +54,7 @@
         <item name="contact_browser_list_padding_left">16dp</item>
         <item name="contact_browser_list_padding_right">0dp</item>
         <item name="contact_browser_background">@color/contact_list_background_color</item>
+        <item name="list_item_name_text_color">@color/contact_list_name_text_color</item>
         <item name="list_item_text_indent">@dimen/contact_browser_list_item_text_indent</item>
         <!-- CallLog -->
         <item name="call_log_primary_text_color">#000000</item>
@@ -72,7 +69,7 @@
         <item name="call_log_voicemail_status_action_text_color">#33b5e5</item>
             <!-- Favorites -->
         <item name="favorites_padding_bottom">?android:attr/actionBarSize</item>
-	<item name="android:colorPrimaryDark">@color/actionbar_background_color_dark</item>
+        <item name="android:colorPrimaryDark">@color/actionbar_background_color_dark</item>
     </style>
 
     <!-- Action bar overflow menu icon. -->
@@ -117,6 +114,7 @@
         <item name="android:background">@color/actionbar_background_color</item>
         <item name="android:backgroundStacked">#ffffff</item>
         <item name="android:titleTextStyle">@style/DialtactsActionBarTitleText</item>
+        <item name="android:height">@dimen/action_bar_height</item>
         <!-- Empty icon -->
         <item name="android:icon">@android:color/transparent</item>
     </style>
@@ -156,10 +154,6 @@
         <item name="android:overScrollMode">always</item>
     </style>
 
-    <style name="FragmentActionBarPadding">
-        <item name="android:paddingBottom">?android:attr/actionBarSize</item>
-    </style>
-
     <style name="DialtactsSearchboxStyle" parent="@android:style/Widget.EditText">
         <item name="android:background">@null</item>
         <item name="android:textColorHint">@color/searchbox_text_color</item>
diff --git a/src/com/android/dialer/DialtactsActivity.java b/src/com/android/dialer/DialtactsActivity.java
index d8a02ac..a593c14 100644
--- a/src/com/android/dialer/DialtactsActivity.java
+++ b/src/com/android/dialer/DialtactsActivity.java
@@ -353,10 +353,7 @@
         final OptionsPopupMenu optionsMenu = buildOptionsMenu(optionsMenuButton);
         optionsMenuButton.setOnTouchListener(optionsMenu.getDragToOpenListener());
 
-        final TypedArray styledAttributes = getTheme().obtainStyledAttributes(
-                new int[] { android.R.attr.actionBarSize });
-        mActionBarHeight = (int) styledAttributes.getDimension(0, 0);
-        styledAttributes.recycle();
+        mActionBarHeight = getResources().getDimensionPixelSize(R.dimen.action_bar_height);
 
         // Add the favorites fragment, and the dialpad fragment, but only if savedInstanceState
         // is null. Otherwise the fragment manager takes care of recreating these fragments.
diff --git a/src/com/android/dialer/list/PhoneFavoriteSquareTileView.java b/src/com/android/dialer/list/PhoneFavoriteSquareTileView.java
index 0520ab4..776a7a2 100644
--- a/src/com/android/dialer/list/PhoneFavoriteSquareTileView.java
+++ b/src/com/android/dialer/list/PhoneFavoriteSquareTileView.java
@@ -21,6 +21,7 @@
 import android.util.AttributeSet;
 import android.view.View;
 import android.widget.ImageButton;
+import android.widget.TextView;
 
 import com.android.contacts.common.R;
 import com.android.contacts.common.list.ContactEntry;
@@ -47,7 +48,10 @@
     @Override
     protected void onFinishInflate() {
         super.onFinishInflate();
-
+        final TextView nameView = (TextView) findViewById(R.id.contact_tile_name);
+        nameView.setElegantTextHeight(false);
+        final TextView phoneTypeView = (TextView) findViewById(R.id.contact_tile_phone_type);
+        phoneTypeView.setElegantTextHeight(false);
         mSecondaryButton = (ImageButton) findViewById(R.id.contact_tile_secondary_button);
     }