Consolidate all the dividers to provide same look and feel

Bug: 30017936
Change-Id: I072cb116dba1df555a63f3f67b730f7f9c3a235a
diff --git a/res/drawable/all_apps_search_bg.xml b/res/drawable/all_apps_search_bg.xml
deleted file mode 100644
index cf63d41..0000000
--- a/res/drawable/all_apps_search_bg.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-     Copyright (C) 2015 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.
--->
-<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
-    <item
-        android:top="@dimen/all_apps_search_bar_bg_overflow"
-        android:left="@dimen/all_apps_search_bar_bg_overflow"
-        android:right="@dimen/all_apps_search_bar_bg_overflow"
-        android:bottom="0dp">
-
-        <shape android:shape="rectangle">
-            <solid android:color="@android:color/transparent" />
-            <stroke
-                android:width="@dimen/all_apps_search_bar_divider_width"
-                android:color="?android:attr/colorAccent"/>
-        </shape>
-    </item>
-</layer-list>
\ No newline at end of file
diff --git a/res/drawable/horizontal_line.xml b/res/drawable/horizontal_line.xml
deleted file mode 100644
index 3f3f17e3..0000000
--- a/res/drawable/horizontal_line.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-     Copyright (C) 2015 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.
--->
-<shape xmlns:android="http://schemas.android.com/apk/res/android"
-    android:shape="rectangle">
-    <size android:height="1dp" />
-    <solid android:color="#ddd" />
-</shape>
diff --git a/res/layout/all_apps.xml b/res/layout/all_apps.xml
index 8c2010f..d55fda7 100644
--- a/res/layout/all_apps.xml
+++ b/res/layout/all_apps.xml
@@ -66,7 +66,6 @@
             android:layout_gravity="center|top"
             android:paddingLeft="@dimen/container_fastscroll_thumb_max_width"
             android:paddingRight="@dimen/container_fastscroll_thumb_max_width"
-            android:background="@drawable/all_apps_search_bg"
             android:gravity="center|bottom"
             android:orientation="horizontal"
             android:saveEnabled="false">
diff --git a/res/layout/all_apps_divider.xml b/res/layout/all_apps_divider.xml
new file mode 100644
index 0000000..b2ee7c1
--- /dev/null
+++ b/res/layout/all_apps_divider.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2015 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.
+-->
+<View xmlns:android="http://schemas.android.com/apk/res/android"
+    android:importantForAccessibility="no"
+    android:layout_width="match_parent"
+    android:layout_height="@dimen/all_apps_divider_height"
+    android:layout_marginBottom="@dimen/all_apps_divider_margin_vertical"
+    android:layout_marginLeft="@dimen/container_fastscroll_thumb_max_width"
+    android:layout_marginRight="@dimen/container_fastscroll_thumb_max_width"
+    android:layout_marginTop="@dimen/all_apps_divider_margin_vertical"
+    android:background="@color/all_apps_divider_color"
+    android:focusable="false" />
\ No newline at end of file
diff --git a/res/layout/all_apps_prediction_bar_icon.xml b/res/layout/all_apps_prediction_bar_icon.xml
index 295b0b7..3836fed 100644
--- a/res/layout/all_apps_prediction_bar_icon.xml
+++ b/res/layout/all_apps_prediction_bar_icon.xml
@@ -21,8 +21,8 @@
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:layout_gravity="center"
-    android:paddingTop="@dimen/all_apps_prediction_icon_top_padding"
-    android:paddingBottom="@dimen/all_apps_prediction_icon_bottom_padding"
+    android:paddingTop="@dimen/all_apps_icon_top_bottom_padding"
+    android:paddingBottom="@dimen/all_apps_icon_top_bottom_padding"
     android:focusable="true"
     launcher:iconDisplay="all_apps" />
 
diff --git a/res/layout/all_apps_search_market.xml b/res/layout/all_apps_search_market.xml
index 741c96a..0199212 100644
--- a/res/layout/all_apps_search_market.xml
+++ b/res/layout/all_apps_search_market.xml
@@ -19,8 +19,8 @@
     android:layout_width="match_parent"
     android:layout_height="48dp"
     android:gravity="start|center_vertical"
-    android:paddingLeft="16dp"
-    android:paddingRight="16dp"
+    android:paddingLeft="@dimen/container_fastscroll_thumb_max_width"
+    android:paddingRight="@dimen/container_fastscroll_thumb_max_width"
     android:fontFamily="sans-serif-medium"
     android:textSize="14sp"
     android:textColor="?android:attr/colorAccent"
diff --git a/res/layout/all_apps_search_market_divider.xml b/res/layout/all_apps_search_market_divider.xml
deleted file mode 100644
index 3909781..0000000
--- a/res/layout/all_apps_search_market_divider.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2015 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.
--->
-<ImageView
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:gravity="center"
-    android:paddingTop="16dp"
-    android:paddingBottom="8dp"
-    android:paddingLeft="16dp"
-    android:paddingRight="16dp"
-    android:focusable="false"
-    android:scaleType="matrix"
-    android:src="@drawable/horizontal_line" />
\ No newline at end of file
diff --git a/res/values/colors.xml b/res/values/colors.xml
index d411a4f..937b2f0 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -35,6 +35,7 @@
     <color name="quantum_panel_bg_color">#FFF5F5F5</color>
 
     <color name="outline_color">#FFFFFFFF</color>
+    <color name="all_apps_divider_color">#1E000000</color>
 
     <color name="spring_loaded_panel_color">#40FFFFFF</color>
     <color name="spring_loaded_highlighted_panel_border_color">#FFF</color>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index f3d0eaa..9abe3e6 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -58,7 +58,7 @@
     <dimen name="container_min_margin">8dp</dimen>
     <dimen name="container_max_width">0dp</dimen>
 
-<!-- All Apps -->
+    <!-- All Apps -->
     <dimen name="all_apps_button_scale_down">0dp</dimen>
     <dimen name="all_apps_grid_view_start_margin">0dp</dimen>
     <dimen name="all_apps_grid_section_y_offset">8dp</dimen>
@@ -69,10 +69,7 @@
     <dimen name="all_apps_search_bar_icon_margin_top">1dp</dimen>
     <dimen name="all_apps_icon_top_bottom_padding">8dp</dimen>
     <dimen name="all_apps_icon_width_gap">24dp</dimen>
-    <!-- The top padding should account for the existing all_apps_list_top_bottom_padding -->
-    <dimen name="all_apps_prediction_icon_top_padding">8dp</dimen>
-    <dimen name="all_apps_prediction_icon_bottom_padding">18dp</dimen>
-    <dimen name="all_apps_list_top_bottom_padding">8dp</dimen>
+    <dimen name="all_apps_list_bottom_padding">8dp</dimen>
     <dimen name="all_apps_empty_search_message_top_offset">40dp</dimen>
     <dimen name="all_apps_empty_search_bg_top_offset">144dp</dimen>
     <dimen name="all_apps_background_canvas_width">700dp</dimen>
@@ -83,13 +80,8 @@
     <dimen name="all_apps_header_scroll_to_elevation">16dp</dimen>
     <dimen name="all_apps_header_shadow_height">6dp</dimen>
 
-    <!-- The overflow is used to create a bottom border, by drawing other three sides
-        outside the bounds. Ensure that:
-            all_apps_search_bar_bg_overflow < (-3 * all_apps_search_bar_divider_width)
-        -6dp is picked at random, any smaller value would do.
-    -->
-    <dimen name="all_apps_search_bar_bg_overflow">-6dp</dimen>
-    <dimen name="all_apps_search_bar_divider_width">1dp</dimen>
+    <dimen name="all_apps_divider_height">1dp</dimen>
+    <dimen name="all_apps_divider_margin_vertical">8dp</dimen>
 
     <dimen name="all_apps_bezel_swipe_height">24dp</dimen>
 <!-- Widget tray -->