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        <!-- Shown when there are recommendations to display -->
77        <LinearLayout
78            android:id="@+id/widget_recommendations_container"
79            android:layout_width="match_parent"
80            android:layout_height="wrap_content"
81            android:layout_marginTop="8dp"
82            android:layout_marginBottom="8dp"
83            android:background="@drawable/widgets_surface_background"
84            android:orientation="vertical"
85            android:layout_marginHorizontal="@dimen/widget_list_horizontal_margin"
86            android:visibility="gone">
87            <include layout="@layout/widget_recommendations" />
88        </LinearLayout>
89
90        <com.android.launcher3.workprofile.PersonalWorkSlidingTabStrip
91            android:id="@+id/tabs"
92            android:layout_width="match_parent"
93            android:layout_height="64dp"
94            android:gravity="center_horizontal"
95            android:orientation="horizontal"
96            android:paddingBottom="8dp"
97            android:paddingHorizontal="@dimen/widget_list_horizontal_margin"
98            android:background="?attr/widgetPickerPrimarySurfaceColor"
99            style="@style/TextHeadline"
100            launcher:layout_sticky="true">
101
102            <Button
103                android:id="@+id/tab_personal"
104                android:layout_width="0dp"
105                android:layout_height="match_parent"
106                android:layout_marginEnd="@dimen/widget_tabs_button_horizontal_padding"
107                android:layout_marginVertical="@dimen/widget_apps_tabs_vertical_padding"
108                android:layout_weight="1"
109                android:background="@drawable/widget_picker_tabs_background"
110                android:text="@string/widgets_full_sheet_personal_tab"
111                android:textColor="@color/widget_picker_tab_text"
112                android:textSize="14sp"
113                style="?android:attr/borderlessButtonStyle" />
114
115            <Button
116                android:id="@+id/tab_work"
117                android:layout_width="0dp"
118                android:layout_height="match_parent"
119                android:layout_marginEnd="@dimen/widget_tabs_button_horizontal_padding"
120                android:layout_marginVertical="@dimen/widget_apps_tabs_vertical_padding"
121                android:layout_weight="1"
122                android:background="@drawable/widget_picker_tabs_background"
123                android:text="@string/widgets_full_sheet_work_tab"
124                android:textColor="@color/widget_picker_tab_text"
125                android:textSize="14sp"
126                style="?android:attr/borderlessButtonStyle" />
127        </com.android.launcher3.workprofile.PersonalWorkSlidingTabStrip>
128
129    </com.android.launcher3.views.StickyHeaderLayout>
130</merge>