From 2c93ec8ae3f31313f97c6f1c827cff2d49fb9c52 Mon Sep 17 00:00:00 2001 From: Sunny Shao Date: Tue, 13 Nov 2018 16:47:36 +0800 Subject: [PATCH] Enabled the floating search bar feature Added the CoordinatorLayout as the top level layout Added the AppBarLayout to enclose the search bar Added the app:layout_behavior="@string/appbar_scrolling_view_behavior" to NestedScrollView Bug: 118886724 Test: manual test Change-Id: I4a8ef14637dc1dc7cf9618eca00e4b7d7a77c725 --- res/layout/search_bar.xml | 1 + res/layout/settings_homepage_container.xml | 42 ++++++++++++++-------- 2 files changed, 28 insertions(+), 15 deletions(-) diff --git a/res/layout/search_bar.xml b/res/layout/search_bar.xml index 1ba64ad1ce0..3d4d0d64722 100644 --- a/res/layout/search_bar.xml +++ b/res/layout/search_bar.xml @@ -21,6 +21,7 @@ android:id="@+id/search_bar_container" android:layout_width="match_parent" android:layout_height="wrap_content" + app:layout_scrollFlags="scroll|enterAlways" android:background="?android:attr/colorPrimary"> - - - + android:layout_height="wrap_content"> + - + + + android:layout_height="wrap_content" + android:orientation="vertical" + android:descendantFocusability="blocksDescendants"> - + - - + + + + +