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.workprofile.PersonalWorkPagedView
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.workprofile.PersonalWorkPagedView>
43
44    <!-- SearchAndRecommendationsView contains the tab layout as well -->
45    <com.android.launcher3.widget.picker.SearchAndRecommendationsView
46        android:id="@+id/search_and_recommendations_container"
47        android:layout_width="match_parent"
48        android:layout_height="wrap_content"
49        android:layout_marginHorizontal="@dimen/widget_list_horizontal_margin"
50        android:layout_below="@id/collapse_handle"
51        android:paddingBottom="0dp"
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="?android:attr/textColorSecondary"
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:background="?android:attr/colorBackground"
70            android:paddingBottom="8dp"
71            android:clipToPadding="false">
72            <include layout="@layout/widgets_search_bar" />
73        </FrameLayout>
74
75        <com.android.launcher3.widget.picker.WidgetsRecommendationTableLayout
76            android:id="@+id/recommended_widget_table"
77            android:layout_width="match_parent"
78            android:layout_height="wrap_content"
79            android:layout_marginTop="8dp"
80            android:background="@drawable/widgets_recommendation_background"
81            android:paddingVertical="@dimen/recommended_widgets_table_vertical_padding"
82            android:visibility="gone" />
83
84        <com.android.launcher3.workprofile.PersonalWorkSlidingTabStrip
85            android:id="@+id/tabs"
86            android:layout_width="match_parent"
87            android:layout_height="64dp"
88            android:gravity="center_horizontal"
89            android:orientation="horizontal"
90            android:paddingVertical="8dp"
91            android:paddingLeft="@dimen/widget_tabs_horizontal_padding"
92            android:paddingRight="@dimen/widget_tabs_horizontal_padding"
93            android:background="?android:attr/colorBackground"
94            style="@style/TextHeadline">
95
96            <Button
97                android:id="@+id/tab_personal"
98                android:layout_width="0dp"
99                android:layout_height="match_parent"
100                android:layout_marginEnd="@dimen/widget_tabs_button_horizontal_padding"
101                android:layout_marginVertical="@dimen/widget_apps_tabs_vertical_padding"
102                android:layout_weight="1"
103                android:background="@drawable/all_apps_tabs_background"
104                android:text="@string/widgets_full_sheet_personal_tab"
105                android:textColor="@color/all_apps_tab_text"
106                android:textSize="14sp"
107                style="?android:attr/borderlessButtonStyle" />
108
109            <Button
110                android:id="@+id/tab_work"
111                android:layout_width="0dp"
112                android:layout_height="match_parent"
113                android:layout_marginEnd="@dimen/widget_tabs_button_horizontal_padding"
114                android:layout_marginVertical="@dimen/widget_apps_tabs_vertical_padding"
115                android:layout_weight="1"
116                android:background="@drawable/all_apps_tabs_background"
117                android:text="@string/widgets_full_sheet_work_tab"
118                android:textColor="@color/all_apps_tab_text"
119                android:textSize="14sp"
120                style="?android:attr/borderlessButtonStyle" />
121        </com.android.launcher3.workprofile.PersonalWorkSlidingTabStrip>
122
123    </com.android.launcher3.widget.picker.SearchAndRecommendationsView>
124</merge>