Introduce ActionBar in picker screens

This change focuses on phone screens. Tablet UI fix will be
done later.

- show SearchView on the action bar
- show "create new contact" as a menu on the split action bar
- keep "create new contact" button for tablet support.
- a few visual tweaks for phone

Also this removes "show all contacts" item in JoinContactActivity.
Now all contacts are shown by default.

Bug: 5394377
Change-Id: I82e59b374888d522c81cd4957cb3fde286b419f6
diff --git a/res/layout/contact_picker.xml b/res/layout/contact_picker.xml
index 96bf334..49be858 100644
--- a/res/layout/contact_picker.xml
+++ b/res/layout/contact_picker.xml
@@ -34,26 +34,4 @@
         android:layout_width="match_parent"
         android:layout_height="0dip"
         android:layout_weight="1" />
-
-    <View
-        android:id="@+id/divider"
-        android:layout_width="match_parent"
-        android:layout_height="1dip"
-        android:layout_marginLeft="16dip"
-        android:layout_marginRight="16dip"
-        android:background="?android:attr/dividerHorizontal" />
-
-    <LinearLayout
-        style="?android:attr/buttonBarStyle"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:paddingLeft="16dip"
-        android:paddingRight="16dip">
-        <Button
-            style="?android:attr/buttonBarButtonStyle"
-            android:id="@+id/cancel"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:text="@android:string/cancel" />
-    </LinearLayout>
 </view>
diff --git a/res/layout/join_contact_picker.xml b/res/layout/join_contact_picker.xml
index ffea137..ea0deaf 100644
--- a/res/layout/join_contact_picker.xml
+++ b/res/layout/join_contact_picker.xml
@@ -33,18 +33,4 @@
         android:layout_marginLeft="?attr/contact_browser_list_padding_left"
         android:layout_marginRight="?attr/contact_browser_list_padding_right"
         android:background="?android:attr/dividerHorizontal" />
-
-    <LinearLayout
-        style="?android:attr/buttonBarStyle"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_marginLeft="?attr/contact_browser_list_padding_left"
-        android:layout_marginRight="?attr/contact_browser_list_padding_right">
-        <Button
-            style="?android:attr/buttonBarButtonStyle"
-            android:id="@+id/cancel"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:text="@android:string/cancel"/>
-    </LinearLayout>
 </view>
diff --git a/res/layout/join_contact_picker_list_content.xml b/res/layout/join_contact_picker_list_content.xml
index 1535539..40137e2 100644
--- a/res/layout/join_contact_picker_list_content.xml
+++ b/res/layout/join_contact_picker_list_content.xml
@@ -19,17 +19,18 @@
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:paddingTop="8dip"
+    android:paddingTop="16dip"
     android:orientation="vertical">
 
     <TextView
         android:id="@+id/join_contact_blurb"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:paddingLeft="16dip"
-        android:paddingRight="16dip"
+        android:layout_marginLeft="@dimen/contact_browser_list_header_left_margin"
+        android:layout_marginRight="@dimen/contact_browser_list_header_right_margin"
+        android:paddingLeft="?attr/list_item_header_text_indent"
         android:maxLines="2"
-        android:textAppearance="?android:attr/textAppearanceMedium" />
+        android:textAppearance="?android:attr/textAppearanceSmall" />
 
     <FrameLayout
         android:id="@+id/pinned_header_list_layout"
diff --git a/res/layout/join_contact_picker_section.xml b/res/layout/join_contact_picker_section_header.xml
similarity index 83%
rename from res/layout/join_contact_picker_section.xml
rename to res/layout/join_contact_picker_section_header.xml
index 260ea2d..50dac70 100644
--- a/res/layout/join_contact_picker_section.xml
+++ b/res/layout/join_contact_picker_section_header.xml
@@ -14,6 +14,7 @@
      limitations under the License.
 -->
 
+<!-- Layout used for "Join contacts" screen's section headers. -->
 <LinearLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
@@ -24,9 +25,13 @@
         android:id="@+id/text"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
+        android:minHeight="32dip"
         android:paddingLeft="?attr/list_item_header_text_indent"
-        android:minHeight="16dip"
         android:textAppearance="?android:attr/textAppearanceSmall"
+        android:textAllCaps="true"
+        android:textStyle="bold"
+        android:singleLine="true"
+        android:ellipsize="end"
         android:gravity="center_vertical" />
 
     <View style="@style/SectionDivider" />