diff --git a/res/drawable/bg_widgets_picker_handle.xml b/res/drawable/bg_widgets_picker_handle.xml new file mode 100644 index 0000000000..68681a684d --- /dev/null +++ b/res/drawable/bg_widgets_picker_handle.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/res/layout/widgets_full_sheet_search_and_recommendations.xml b/res/layout/widgets_full_sheet_search_and_recommendations.xml index ce7a682376..a89f85f695 100644 --- a/res/layout/widgets_full_sheet_search_and_recommendations.xml +++ b/res/layout/widgets_full_sheet_search_and_recommendations.xml @@ -18,35 +18,44 @@ android:id="@+id/search_and_recommendations_container" android:layout_width="match_parent" android:layout_height="wrap_content" - android:paddingHorizontal="16dp" android:layout_marginBottom="16dp" - android:orientation="vertical" - android:clipToPadding="false"> + android:orientation="vertical"> + + android:layout_width="match_parent" + android:layout_height="18dp" + android:elevation="0.1dp" + android:background="@drawable/bg_widgets_picker_handle"/> + - + + + + + android:visibility="gone" /> diff --git a/res/layout/widgets_search_bar.xml b/res/layout/widgets_search_bar.xml index 24671565ee..6a4bb4d2d0 100644 --- a/res/layout/widgets_search_bar.xml +++ b/res/layout/widgets_search_bar.xml @@ -5,10 +5,9 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" - android:layout_marginTop="16dp" - android:layout_marginBottom="1dp" - android:background="@drawable/bg_widgets_searchbox" - android:elevation="2dp"> + android:layout_marginTop="24dp" + android:layout_marginHorizontal="16dp" + android:background="@drawable/bg_widgets_searchbox"> 0) { int searchYDisplacement = Math.max(-recyclerViewYOffset, -mCollapsibleHeightForSearch); - mViewHolder.mSearchBar.setTranslationY(searchYDisplacement); + mViewHolder.mSearchBarContainer.setTranslationY(searchYDisplacement); } if (mHasWorkProfile && mCollapsibleHeightForTabs > 0) { @@ -255,7 +255,7 @@ final class SearchAndRecommendationsScrollController implements /** Resets any previous view translation. */ public void reset() { mViewHolder.mHeaderTitle.setTranslationY(0); - mViewHolder.mSearchBar.setTranslationY(0); + mViewHolder.mSearchBarContainer.setTranslationY(0); if (mHasWorkProfile) { mPrimaryWorkTabsView.setTranslationY(0); } diff --git a/src/com/android/launcher3/widget/picker/WidgetsFullSheet.java b/src/com/android/launcher3/widget/picker/WidgetsFullSheet.java index 0ea50e6514..e44acc363b 100644 --- a/src/com/android/launcher3/widget/picker/WidgetsFullSheet.java +++ b/src/com/android/launcher3/widget/picker/WidgetsFullSheet.java @@ -713,6 +713,7 @@ public class WidgetsFullSheet extends BaseWidgetSheet final class SearchAndRecommendationViewHolder { final SearchAndRecommendationsView mContainer; final View mCollapseHandle; + final View mSearchBarContainer; final WidgetsSearchBar mSearchBar; final TextView mHeaderTitle; final WidgetsRecommendationTableLayout mRecommendedWidgetsTable; @@ -721,6 +722,7 @@ public class WidgetsFullSheet extends BaseWidgetSheet SearchAndRecommendationsView searchAndRecommendationContainer) { mContainer = searchAndRecommendationContainer; mCollapseHandle = mContainer.findViewById(R.id.collapse_handle); + mSearchBarContainer = mContainer.findViewById(R.id.search_bar_container); mSearchBar = mContainer.findViewById(R.id.widgets_search_bar); mHeaderTitle = mContainer.findViewById(R.id.title); mRecommendedWidgetsTable = mContainer.findViewById(R.id.recommended_widget_table);