1<?xml version="1.0" encoding="utf-8"?> 2<!-- Copyright (C) 2021 The Android Open Source Project 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15--> 16<merge xmlns:android="http://schemas.android.com/apk/res/android" 17 xmlns:launcher="http://schemas.android.com/apk/res-auto"> 18 19 <com.android.launcher3.widget.picker.WidgetPagedView 20 android:id="@+id/widgets_view_pager" 21 android:layout_width="match_parent" 22 android:layout_height="match_parent" 23 android:clipToPadding="false" 24 android:layout_below="@id/collapse_handle" 25 android:descendantFocusability="afterDescendants" 26 launcher:pageIndicator="@+id/tabs" > 27 28 <com.android.launcher3.widget.picker.WidgetsRecyclerView 29 android:id="@+id/primary_widgets_list_view" 30 android:layout_width="match_parent" 31 android:layout_height="match_parent" 32 android:paddingHorizontal="@dimen/widget_list_horizontal_margin" 33 android:clipToPadding="false" /> 34 35 <com.android.launcher3.widget.picker.WidgetsRecyclerView 36 android:id="@+id/work_widgets_list_view" 37 android:layout_width="match_parent" 38 android:layout_height="match_parent" 39 android:paddingHorizontal="@dimen/widget_list_horizontal_margin" 40 android:clipToPadding="false" /> 41 42 </com.android.launcher3.widget.picker.WidgetPagedView> 43 44 <!-- SearchAndRecommendationsView contains the tab layout as well --> 45 <com.android.launcher3.views.StickyHeaderLayout 46 android:id="@+id/search_and_recommendations_container" 47 android:layout_width="match_parent" 48 android:layout_height="wrap_content" 49 android:layout_below="@id/collapse_handle" 50 android:paddingBottom="0dp" 51 android:clipToOutline="true" 52 android:orientation="vertical"> 53 54 <TextView 55 android:id="@+id/title" 56 android:layout_width="match_parent" 57 android:layout_height="wrap_content" 58 android:gravity="center_horizontal" 59 android:textSize="24sp" 60 android:layout_marginTop="24dp" 61 android:textColor="?attr/widgetPickerTitleColor" 62 android:text="@string/widget_button_text"/> 63 64 <FrameLayout 65 android:id="@+id/search_bar_container" 66 android:layout_width="match_parent" 67 android:layout_height="wrap_content" 68 android:elevation="0.1dp" 69 android:paddingHorizontal="@dimen/widget_list_horizontal_margin" 70 android:background="?attr/widgetPickerPrimarySurfaceColor" 71 android:paddingBottom="8dp" 72 launcher:layout_sticky="true"> 73 <include layout="@layout/widgets_search_bar" /> 74 </FrameLayout> 75 76 <com.android.launcher3.widget.picker.WidgetsRecommendationTableLayout 77 android:id="@+id/recommended_widget_table" 78 android:layout_width="match_parent" 79 android:layout_height="wrap_content" 80 android:layout_marginTop="8dp" 81 android:layout_marginHorizontal="@dimen/widget_list_horizontal_margin" 82 android:background="@drawable/widgets_surface_background" 83 android:paddingVertical="@dimen/recommended_widgets_table_vertical_padding" 84 android:visibility="gone" /> 85 86 <com.android.launcher3.workprofile.PersonalWorkSlidingTabStrip 87 android:id="@+id/tabs" 88 android:layout_width="match_parent" 89 android:layout_height="64dp" 90 android:gravity="center_horizontal" 91 android:orientation="horizontal" 92 android:paddingVertical="8dp" 93 android:paddingHorizontal="@dimen/widget_list_horizontal_margin" 94 android:background="?attr/widgetPickerPrimarySurfaceColor" 95 style="@style/TextHeadline" 96 launcher:layout_sticky="true"> 97 98 <Button 99 android:id="@+id/tab_personal" 100 android:layout_width="0dp" 101 android:layout_height="match_parent" 102 android:layout_marginEnd="@dimen/widget_tabs_button_horizontal_padding" 103 android:layout_marginVertical="@dimen/widget_apps_tabs_vertical_padding" 104 android:layout_weight="1" 105 android:background="@drawable/widget_picker_tabs_background" 106 android:text="@string/widgets_full_sheet_personal_tab" 107 android:textColor="@color/widget_picker_tab_text" 108 android:textSize="14sp" 109 style="?android:attr/borderlessButtonStyle" /> 110 111 <Button 112 android:id="@+id/tab_work" 113 android:layout_width="0dp" 114 android:layout_height="match_parent" 115 android:layout_marginEnd="@dimen/widget_tabs_button_horizontal_padding" 116 android:layout_marginVertical="@dimen/widget_apps_tabs_vertical_padding" 117 android:layout_weight="1" 118 android:background="@drawable/widget_picker_tabs_background" 119 android:text="@string/widgets_full_sheet_work_tab" 120 android:textColor="@color/widget_picker_tab_text" 121 android:textSize="14sp" 122 style="?android:attr/borderlessButtonStyle" /> 123 </com.android.launcher3.workprofile.PersonalWorkSlidingTabStrip> 124 125 </com.android.launcher3.views.StickyHeaderLayout> 126</merge>