diff --git a/res/layout/dashboard_header_spacer.xml b/res/layout/dashboard_header_spacer.xml
deleted file mode 100644
index 442ae48..0000000
--- a/res/layout/dashboard_header_spacer.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2017 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.
--->
-
-<LinearLayout
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:padding="@dimen/search_bar_margin">
-    <View
-        android:layout_width="match_parent"
-        android:layout_height="?android:attr/actionBarSize"/>
-</LinearLayout>
diff --git a/res/layout/settings_main_dashboard.xml b/res/layout/settings_main_dashboard.xml
index 1a3b133..189c732 100644
--- a/res/layout/settings_main_dashboard.xml
+++ b/res/layout/settings_main_dashboard.xml
@@ -17,32 +17,36 @@
 */
 -->
 
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:layout_width="match_parent">
+    android:orientation="vertical">
+    <FrameLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:background="@color/material_grey_300">
+        <android.support.v7.widget.CardView
+            android:id="@+id/search_bar"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_margin="@dimen/search_bar_margin"
+            app:cardCornerRadius="2dp"
+            app:cardBackgroundColor="?android:attr/colorBackground"
+            app:cardElevation="2dp">
+            <Toolbar
+                android:id="@+id/search_action_bar"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:background="?android:attr/selectableItemBackground"
+                android:contentInsetStartWithNavigation="64dp"
+                android:navigationIcon="@drawable/ic_search_24dp"
+                android:titleTextColor="@*android:color/text_color_primary"
+                android:theme="?android:attr/actionBarTheme"/>
+        </android.support.v7.widget.CardView>
+    </FrameLayout>
     <FrameLayout
         android:id="@+id/main_content"
         android:layout_height="match_parent"
         android:layout_width="match_parent"/>
-    <android.support.v7.widget.CardView
-        android:id="@+id/search_bar"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_margin="@dimen/search_bar_margin"
-        app:cardCornerRadius="2dp"
-        app:cardBackgroundColor="?android:attr/colorBackground"
-        app:cardElevation="2dp">
-        <Toolbar
-            android:id="@+id/search_action_bar"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_marginStart="@dimen/search_bar_negative_margin"
-            android:background="?android:attr/selectableItemBackground"
-            android:navigationIcon="@drawable/ic_search_24dp"
-            android:title="@string/search_menu"
-            android:titleTextAppearance="?android:attr/subtitleTextAppearance"
-            android:titleTextColor="?android:attr/textColorHint"
-            android:theme="?android:attr/actionBarTheme"/>
-    </android.support.v7.widget.CardView>
-</FrameLayout>
+</LinearLayout>
diff --git a/src/com/android/settings/SettingsActivity.java b/src/com/android/settings/SettingsActivity.java
index 805f965..556dbfb 100644
--- a/src/com/android/settings/SettingsActivity.java
+++ b/src/com/android/settings/SettingsActivity.java
@@ -337,6 +337,14 @@
             Toolbar toolbar = findViewById(R.id.search_action_bar);
             toolbar.setOnClickListener(this);
             setActionBar(toolbar);
+
+            // Please forgive me for what I am about to do.
+            //
+            // Need to make the navigation icon non-clickable so that the entire card is clickable
+            // and goes to the search UI. Also set the background to null so there's no ripple.
+            View navView = toolbar.getNavigationView();
+            navView.setClickable(false);
+            navView.setBackground(null);
         }
 
         ActionBar actionBar = getActionBar();
diff --git a/src/com/android/settings/dashboard/DashboardAdapter.java b/src/com/android/settings/dashboard/DashboardAdapter.java
index 8e795cb..38c6a28 100644
--- a/src/com/android/settings/dashboard/DashboardAdapter.java
+++ b/src/com/android/settings/dashboard/DashboardAdapter.java
@@ -65,7 +65,6 @@
     private static final String STATE_CATEGORY_LIST = "category_list";
     private static final String STATE_SUGGESTION_MODE = "suggestion_mode";
     private static final String STATE_SUGGESTIONS_SHOWN_LOGGED = "suggestions_shown_logged";
-    private static final int DONT_SET_BACKGROUND_ATTR = -1;
     private static final String STATE_SUGGESTION_CONDITION_MODE = "suggestion_condition_mode";
 
     private final IconCache mCache;
@@ -305,9 +304,6 @@
     public void onBindViewHolder(DashboardItemHolder holder, int position) {
         final int type = mDashboardData.getItemTypeByPosition(position);
         switch (type) {
-            case R.layout.dashboard_header_spacer:
-                onBindHeaderSpacer(holder, position);
-                break;
             case R.layout.dashboard_category:
                 onBindCategory(holder,
                         (DashboardCategory) mDashboardData.getItemEntityByPosition(position));
@@ -484,33 +480,6 @@
         notifyDashboardDataChanged(prevData);
     }
 
-    private void onBindHeaderSpacer(DashboardItemHolder holder, int position) {
-        if (mDashboardData.size() > (position + 1)) {
-            // The spacer that goes underneath the search bar needs to match the
-            // background of the first real view. That view is either a condition,
-            // a suggestion, or the dashboard item.
-            //
-            // If it's a dashboard item, set null background so it uses the parent's
-            // background like the other views. Otherwise, match the colors.
-            int nextType = mDashboardData.getItemTypeByPosition(position + 1);
-            int colorAttr = nextType == R.layout.suggestion_header
-                    ? android.R.attr.colorSecondary
-                    : nextType == R.layout.condition_card
-                            ? android.R.attr.colorAccent
-                            : DONT_SET_BACKGROUND_ATTR;
-
-            if (colorAttr != DONT_SET_BACKGROUND_ATTR) {
-                TypedArray array = holder.itemView.getContext()
-                        .obtainStyledAttributes(new int[]{colorAttr});
-                @ColorInt int color = array.getColor(0, 0);
-                array.recycle();
-                holder.itemView.setBackgroundColor(color);
-            } else {
-                holder.itemView.setBackground(null);
-            }
-        }
-    }
-
     @VisibleForTesting
     void onBindSuggestionHeader(final DashboardItemHolder holder, DashboardData
             .SuggestionHeaderData data) {
diff --git a/src/com/android/settings/dashboard/DashboardData.java b/src/com/android/settings/dashboard/DashboardData.java
index 64e8af2..6f776b2 100644
--- a/src/com/android/settings/dashboard/DashboardData.java
+++ b/src/com/android/settings/dashboard/DashboardData.java
@@ -60,8 +60,7 @@
     public static final int DEFAULT_SUGGESTION_COUNT = 2;
 
     // id namespace for different type of items.
-    private static final int NS_HEADER_SPACER = 0;
-    private static final int NS_SPACER = 1000;
+    private static final int NS_SPACER = 0;
     private static final int NS_ITEMS = 2000;
     private static final int NS_CONDITION = 3000;
     private static final int NS_SUGGESTION_CONDITION = 4000;
@@ -283,9 +282,6 @@
      * and mIsShowingAll, mSuggestionMode flag.
      */
     private void buildItemsData() {
-        // add the view that goes under the search bar
-        countItem(null, R.layout.dashboard_header_spacer, true, NS_HEADER_SPACER);
-        resetCount();
         final boolean hasSuggestions = sizeOf(mSuggestions) > 0;
         if (!mCombineSuggestionAndCondition) {
             boolean hasConditions = false;
diff --git a/tests/robotests/src/com/android/settings/dashboard/DashboardAdapterTest.java b/tests/robotests/src/com/android/settings/dashboard/DashboardAdapterTest.java
index e9b29dd..af35520 100644
--- a/tests/robotests/src/com/android/settings/dashboard/DashboardAdapterTest.java
+++ b/tests/robotests/src/com/android/settings/dashboard/DashboardAdapterTest.java
@@ -124,53 +124,6 @@
     }
 
     @Test
-    public void testOnBindViewHolder_spacer_noSuggestions_noConditions() {
-        makeCategory();
-        DashboardAdapter.DashboardItemHolder holder = setupSpacer();
-
-        mDashboardAdapter.onBindViewHolder(holder, 0);
-
-        assertThat(holder.itemView.getBackground()).isNull();
-    }
-
-    @Test
-    public void testOnBindViewHolder_spacer_suggestion_noConditions() {
-        setupSuggestions(makeSuggestions("pkg1"));
-        makeCategory();
-        DashboardAdapter.DashboardItemHolder holder = setupSpacer();
-
-        mDashboardAdapter.onBindViewHolder(holder, 0);
-
-        assertThat(holder.itemView.getBackground()).isNotNull();
-        assertThat(holder.itemView.getBackground()).isInstanceOf(ColorDrawable.class);
-    }
-
-    @Test
-    public void testOnBindViewHolder_spacer_noSuggestion_condition() {
-        makeCondition();
-        makeCategory();
-        DashboardAdapter.DashboardItemHolder holder = setupSpacer();
-
-        mDashboardAdapter.onBindViewHolder(holder, 0);
-
-        assertThat(holder.itemView.getBackground()).isNotNull();
-        assertThat(holder.itemView.getBackground()).isInstanceOf(ColorDrawable.class);
-    }
-
-    @Test
-    public void testOnBindViewHolder_spacer_suggestion_condition() {
-        setupSuggestions(makeSuggestions("pkg1"));
-        makeCondition();
-        makeCategory();
-        DashboardAdapter.DashboardItemHolder holder = setupSpacer();
-
-        mDashboardAdapter.onBindViewHolder(holder, 0);
-
-        assertThat(holder.itemView.getBackground()).isNotNull();
-        assertThat(holder.itemView.getBackground()).isInstanceOf(ColorDrawable.class);
-    }
-
-    @Test
     public void testSuggestionsLogs_NotExpanded() {
         setupSuggestions(makeSuggestions("pkg1", "pkg2", "pkg3"));
         verify(mFactory.metricsFeatureProvider, times(2)).action(
@@ -388,7 +341,7 @@
                 new FrameLayout(RuntimeEnvironment.application),
                 R.layout.suggestion_tile_card);
 
-        mDashboardAdapter.onBindViewHolder(mSuggestionHolder, 2);
+        mDashboardAdapter.onBindViewHolder(mSuggestionHolder, 1);
         assertThat(textView.getParent()).isSameAs(mSuggestionHolder.itemView);
         mSuggestionHolder.itemView.performClick();
 
@@ -413,7 +366,7 @@
                 new FrameLayout(context),
                 R.layout.suggestion_tile_card);
 
-        mDashboardAdapter.onBindViewHolder(mSuggestionHolder, 2);
+        mDashboardAdapter.onBindViewHolder(mSuggestionHolder, 1);
 
         mSuggestionHolder.itemView.performClick();
         assertThat(ShadowApplication.getInstance().getNextStartedActivity()).isNull();
@@ -442,8 +395,8 @@
                 new FrameLayout(context),
                 R.layout.suggestion_tile_card);
 
-        mDashboardAdapter.onBindViewHolder(mSuggestionHolder, 2);
-        mDashboardAdapter.onBindViewHolder(mSuggestionHolder, 2);
+        mDashboardAdapter.onBindViewHolder(mSuggestionHolder, 1);
+        mDashboardAdapter.onBindViewHolder(mSuggestionHolder, 1);
 
         ViewGroup itemView = (ViewGroup) mSuggestionHolder.itemView;
         assertThat(itemView.getChildCount()).isEqualTo(1);
@@ -509,25 +462,4 @@
                 new FrameLayout(RuntimeEnvironment.application),
                 mDashboardAdapter.getItemViewType(1));
     }
-
-    private void makeCondition() {
-        final List<Condition> conditions = new ArrayList<>();
-        Condition condition = mock(Condition.class);
-        when(condition.shouldShow()).thenReturn(true);
-        conditions.add(condition);
-        mDashboardAdapter.setConditions(conditions);
-    }
-
-    private void makeCategory() {
-        List<DashboardCategory> categories = new ArrayList<>();
-        categories.add(new DashboardCategory());
-        mDashboardAdapter.setCategory(categories);
-    }
-
-    private DashboardAdapter.DashboardItemHolder setupSpacer() {
-        Context context = RuntimeEnvironment.application;
-        final View view = LayoutInflater.from(context)
-                .inflate(R.layout.dashboard_header_spacer, new LinearLayout(context), false);
-        return new DashboardAdapter.DashboardItemHolder(view);
-    }
 }
diff --git a/tests/robotests/src/com/android/settings/dashboard/DashboardDataTest.java b/tests/robotests/src/com/android/settings/dashboard/DashboardDataTest.java
index 23681bc..8c6a828 100644
--- a/tests/robotests/src/com/android/settings/dashboard/DashboardDataTest.java
+++ b/tests/robotests/src/com/android/settings/dashboard/DashboardDataTest.java
@@ -117,7 +117,7 @@
         final DashboardData.SuggestionConditionHeaderData data =
                 new DashboardData.SuggestionConditionHeaderData(
                     mDashboardDataWithOneConditions.getConditions(), 0);
-        final Object[] expectedObjects = {null, data,
+        final Object[] expectedObjects = {data,
             mDashboardDataWithOneConditions.getSuggestions(),
             mDashboardDataWithOneConditions.getConditions(),
             null, mDashboardCategory, mTestCategoryTile};
@@ -196,11 +196,11 @@
         // Item in position 1 is the header, which contains the number of conditions, changed from
         // 1 to 2
         testResultData.add(new ListUpdateResult.ResultData(
-                ListUpdateResult.ResultData.TYPE_OPERATION_CHANGE, 1, 1));
+                ListUpdateResult.ResultData.TYPE_OPERATION_CHANGE, 0, 1));
         // Item in position 3 is the condition container containing the list of conditions, which
         // gets 1 more item
         testResultData.add(new ListUpdateResult.ResultData(
-            ListUpdateResult.ResultData.TYPE_OPERATION_CHANGE, 3, 1));
+            ListUpdateResult.ResultData.TYPE_OPERATION_CHANGE, 2, 1));
 
         testDiffUtil(mDashboardDataWithOneConditions,
                 mDashboardDataWithTwoConditions, testResultData);
@@ -211,7 +211,7 @@
         //Build testResultData
         final List<ListUpdateResult.ResultData> testResultData = new ArrayList<>();
         testResultData.add(new ListUpdateResult.ResultData(
-                ListUpdateResult.ResultData.TYPE_OPERATION_REMOVE, 1, 6));
+                ListUpdateResult.ResultData.TYPE_OPERATION_REMOVE, 0, 6));
 
         testDiffUtil(mDashboardDataWithOneConditions, mDashboardDataWithNoItems, testResultData);
     }
