Truncate strings in menu item of NavigationView

Also:
* don't show "All contacts" header in main search mode
* remove some unused resources

Bug 28762946
Bug 28555607

Change-Id: I817433a18ac0cf1f9b5c48ea7cc5a9aaf7730012
diff --git a/res/layout/contacts_drawer_activity.xml b/res/layout/contacts_drawer_activity.xml
index ad68e84..e560494 100644
--- a/res/layout/contacts_drawer_activity.xml
+++ b/res/layout/contacts_drawer_activity.xml
@@ -53,6 +53,7 @@
 
     <android.support.design.widget.NavigationView
         android:id="@+id/nav_view"
+        android:theme="@style/NavigationDrawerMenuItemTextAppearance"
         android:layout_width="wrap_content"
         android:layout_height="match_parent"
         android:layout_gravity="start"
diff --git a/res/layout/people_navigation_item.xml b/res/layout/people_navigation_item.xml
deleted file mode 100644
index 60a7a49..0000000
--- a/res/layout/people_navigation_item.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- 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.
--->
-
-<!-- This is the text view layout that is shown in the spinner for the navigation drop down menu on
-     tablet devices.  The text appearance is governed via two styles:
-     PeopleNavigationDropDownHeaderTextAppearance - text appearance of the item in the header part
-         of navigation drop down list of the action bar.
-     PeopleNavigationDropDownTextAppearance - text appearance of the item in the drop down part of
-         the navigation drop down list of the action bar. -->
-<TextView xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:gravity="center_vertical"
-    android:paddingLeft="18dip"
-    android:paddingRight="18dip"
-    android:paddingStart="18dip"
-    android:paddingEnd="18dip"
-    android:minHeight="?android:attr/listPreferredItemHeightSmall"
-/>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 246438d..9f1ea83 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -307,28 +307,8 @@
         <item name="android:orientation">vertical</item>
     </style>
 
-    <style name="Theme.PhotoSelector" parent="@android:style/Theme.Holo.Light">
-        <item name="android:windowBackground">@android:color/transparent</item>
-        <item name="android:windowFrame">@null</item>
-        <item name="android:windowContentOverlay">@null</item>
-        <item name="android:windowAnimationStyle">@null</item>
-        <item name="android:backgroundDimEnabled">false</item>
-        <item name="android:windowIsTranslucent">true</item>
-        <item name="android:windowNoTitle">true</item>
-    </style>
-
     <style name="GroupMembershipSizeTextAppearance" parent="@android:style/TextAppearance.Small"/>
 
-    <style name="PeopleNavigationDropDownTextAppearance">
-        <item name="android:textColor">@color/primary_text_color</item>
-        <item name="android:textSize">18sp</item>
-    </style>
-
-    <style name="PeopleNavigationDropDownHeaderTextAppearance">
-        <item name="android:textColor">@color/primary_text_color</item>
-        <item name="android:textSize">18sp</item>
-    </style>
-
     <style name="ExpandingEntryCardStyle">
         <item name="android:elevation">@dimen/expanding_entry_card_elevation</item>
         <item name="android:background">@color/expanding_entry_card_background_color</item>
@@ -406,4 +386,8 @@
         <item name="android:textColor">#363636</item>
         <item name="android:fontFamily">sans-serif</item>
     </style>
+
+    <style name="NavigationDrawerMenuItemTextAppearance">
+        <item name="android:ellipsize">end</item>
+    </style>
 </resources>
diff --git a/src/com/android/contacts/list/DefaultContactBrowseListFragment.java b/src/com/android/contacts/list/DefaultContactBrowseListFragment.java
index aad99d1..6134047 100644
--- a/src/com/android/contacts/list/DefaultContactBrowseListFragment.java
+++ b/src/com/android/contacts/list/DefaultContactBrowseListFragment.java
@@ -50,6 +50,7 @@
         setQuickContactEnabled(false);
         setSectionHeaderDisplayEnabled(true);
         setVisibleScrollbarEnabled(true);
+        setDisplayDirectoryHeader(false);
     }
 
     @Override