1<?xml version="1.0" encoding="utf-8"?><!-- Copyright (C) 2022 The Android Open Source Project
2
3     Licensed under the Apache License, Version 2.0 (the "License");
4     you may not use this file except in compliance with the License.
5     You may obtain a copy of the License at
6
7          http://www.apache.org/licenses/LICENSE-2.0
8
9     Unless required by applicable law or agreed to in writing, software
10     distributed under the License is distributed on an "AS IS" BASIS,
11     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12     See the License for the specific language governing permissions and
13     limitations under the License.
14-->
15<com.android.launcher3.widget.picker.WidgetsTwoPaneSheet
16    xmlns:android="http://schemas.android.com/apk/res/android"
17    xmlns:tools="http://schemas.android.com/tools"
18    android:layout_width="match_parent"
19    android:layout_height="match_parent"
20    android:orientation="vertical"
21    android:theme="?attr/widgetsTheme">
22
23    <com.android.launcher3.views.SpringRelativeLayout
24        android:id="@+id/container"
25        android:layout_width="match_parent"
26        android:layout_height="match_parent">
27
28        <View
29            android:id="@+id/collapse_handle"
30            android:layout_width="@dimen/bottom_sheet_handle_width"
31            android:layout_height="@dimen/bottom_sheet_handle_height"
32            android:layout_marginTop="@dimen/bottom_sheet_handle_margin"
33            android:layout_centerHorizontal="true"
34            android:background="@drawable/widget_picker_collapse_handle"/>
35
36        <TextView
37            android:id="@+id/title"
38            android:layout_width="match_parent"
39            android:layout_height="wrap_content"
40            android:layout_marginTop="24dp"
41            android:gravity="center_horizontal"
42            android:layout_below="@id/collapse_handle"
43            android:paddingHorizontal="@dimen/widget_list_horizontal_margin_two_pane"
44            android:text="@string/widget_button_text"
45            android:textColor="?attr/widgetPickerTitleColor"
46            android:textSize="24sp" />
47
48        <TextView
49            android:id="@+id/widget_picker_description"
50            android:layout_width="match_parent"
51            android:layout_height="wrap_content"
52            android:gravity="center_horizontal"
53            android:layout_below="@id/title"
54            android:maxLines="1"
55            android:paddingHorizontal="@dimen/widget_list_horizontal_margin_two_pane"
56            android:textColor="?attr/widgetPickerDescriptionColor"
57            android:visibility="gone"
58            android:lineHeight="20sp"
59            android:textSize="14sp" />
60
61        <LinearLayout
62            android:id="@+id/linear_layout_container"
63            android:layout_width="match_parent"
64            android:layout_height="match_parent"
65            android:layout_below="@id/widget_picker_description">
66
67            <FrameLayout
68                android:id="@+id/recycler_view_container"
69                android:layout_width="0dp"
70                android:layout_height="match_parent"
71                android:clipChildren="false"
72                android:clipToPadding="false"
73                android:paddingBottom="8dp"
74                android:layout_gravity="start"
75                android:layout_weight="0.33">
76                <TextView
77                    android:id="@+id/fast_scroller_popup"
78                    style="@style/FastScrollerPopup"
79                    android:layout_marginEnd="@dimen/fastscroll_popup_margin" />
80
81                <!-- Fast scroller popup -->
82                <com.android.launcher3.views.RecyclerViewFastScroller
83                    android:id="@+id/fast_scroller"
84                    android:layout_width="@dimen/fastscroll_width"
85                    android:layout_height="match_parent"
86                    android:layout_marginEnd="@dimen/fastscroll_end_margin" />
87            </FrameLayout>
88
89            <FrameLayout
90                android:layout_width="0dp"
91                android:layout_height="match_parent"
92                android:layout_weight="0.67">
93                <FrameLayout
94                    android:id="@+id/right_pane_container"
95                    android:layout_width="match_parent"
96                    android:layout_height="match_parent"
97                    android:layout_marginVertical="@dimen/widget_picker_vertical_margin_right_pane"
98                    android:layout_marginEnd="@dimen/widget_list_horizontal_margin_two_pane"
99                    android:gravity="end"
100                    android:layout_gravity="end"
101                    android:orientation="horizontal">
102                    <ScrollView
103                        android:id="@+id/right_pane_scroll_view"
104                        android:layout_width="match_parent"
105                        android:layout_height="match_parent"
106                        android:background="@drawable/widgets_surface_background"
107                        android:scrollbarThumbVertical="@drawable/widget_picker_preview_pane_scroll_thumb"
108                        android:clipToOutline="true"
109                        android:fillViewport="true">
110                        <LinearLayout
111                            android:orientation="vertical"
112                            android:layout_width="match_parent"
113                            android:layout_height="wrap_content"
114                            android:gravity="center_vertical"
115                            android:clipToOutline="true"
116                            android:paddingBottom="36dp"
117                            android:background="@drawable/widgets_surface_background"
118                            android:importantForAccessibility="yes"
119                            android:id="@+id/right_pane">
120                            <TextView
121                                android:id="@+id/no_widgets_text"
122                                style="@style/PrimaryHeadline"
123                                android:layout_width="match_parent"
124                                android:layout_height="match_parent"
125                                android:gravity="center"
126                                android:textSize="18sp"
127                                android:visibility="gone"
128                                tools:text="@string/no_widgets_available" />
129
130                            <!-- Shown when there are recommendations to display -->
131                            <LinearLayout
132                                android:id="@+id/widget_recommendations_container"
133                                android:layout_width="match_parent"
134                                android:layout_height="match_parent"
135                                android:background="@drawable/widgets_surface_background"
136                                android:clipToOutline="true"
137                                android:orientation="vertical"
138                                android:visibility="gone">
139                                <include layout="@layout/widget_recommendations" />
140                            </LinearLayout>
141                        </LinearLayout>
142                    </ScrollView>
143                </FrameLayout>
144            </FrameLayout>
145        </LinearLayout>
146    </com.android.launcher3.views.SpringRelativeLayout>
147</com.android.launcher3.widget.picker.WidgetsTwoPaneSheet>
148