1<?xml version="1.0" encoding="utf-8"?><!--
2  ~ Copyright (C) 2023 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  -->
17<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
18    android:layout_width="match_parent"
19    android:layout_height="match_parent"
20    android:orientation="vertical"
21    android:clipChildren="false"
22    android:transitionGroup="true">
23
24    <FrameLayout
25        android:id="@+id/section_header_container"
26        android:layout_width="match_parent"
27        android:layout_height="wrap_content">
28
29        <include layout="@layout/section_header" />
30    </FrameLayout>
31
32    <com.android.wallpaper.picker.DisplayAspectRatioFrameLayout
33        android:layout_width="match_parent"
34        android:layout_height="0dp"
35        android:layout_weight="1"
36        android:paddingTop="20dp"
37        android:paddingBottom="40dp"
38        android:clipChildren="false">
39
40        <include
41            android:id="@+id/lock_preview"
42            layout="@layout/wallpaper_preview_card"
43            android:layout_width="0dp"
44            android:layout_height="match_parent"
45            android:layout_gravity="center" />
46
47        <com.android.customization.picker.clock.ui.view.ClockHostView
48            android:id="@+id/clock_host_view"
49            android:importantForAccessibility="noHideDescendants"
50            android:layout_width="match_parent"
51            android:layout_height="match_parent"
52            android:layout_gravity="center" />
53    </com.android.wallpaper.picker.DisplayAspectRatioFrameLayout>
54
55    <LinearLayout
56        android:layout_width="match_parent"
57        android:layout_height="wrap_content"
58        android:orientation="vertical"
59        android:layout_marginHorizontal="24dp"
60        android:layout_marginBottom="28dp"
61        android:background="@drawable/picker_fragment_background"
62        android:paddingTop="22dp"
63        android:paddingBottom="36dp"
64        android:clipChildren="false">
65
66        <FrameLayout
67            android:layout_width="match_parent"
68            android:layout_height="wrap_content"
69            android:layout_marginBottom="22dp"
70            android:layout_gravity="center_horizontal">
71
72            <androidx.recyclerview.widget.RecyclerView
73                android:id="@+id/tabs"
74                android:layout_width="wrap_content"
75                android:layout_height="wrap_content"
76                android:clipToPadding="false"
77                android:paddingHorizontal="16dp"
78                android:layout_gravity="center_horizontal" />
79
80            <!--
81            This is just an invisible placeholder put in place so that the parent keeps its height
82            stable as the RecyclerView updates from 0 items to N items. Keeping it stable allows the
83            layout logic to keep the size of the preview container stable as well, which bodes well
84            for setting up the SurfaceView for remote rendering without changing its size after the
85            content is loaded into the RecyclerView.
86
87            It's critical for any TextViews inside the included layout to have text.
88            -->
89            <include
90                layout="@layout/picker_fragment_tab"
91                android:layout_width="wrap_content"
92                android:layout_height="wrap_content"
93                android:visibility="invisible" />
94        </FrameLayout>
95
96        <FrameLayout
97            android:layout_width="match_parent"
98            android:layout_height="wrap_content"
99            android:clipChildren="false">
100
101            <LinearLayout
102                android:id="@+id/color_picker_container"
103                android:layout_width="match_parent"
104                android:layout_height="wrap_content"
105                android:orientation="vertical"
106                android:clipChildren="false">
107
108                <FrameLayout
109                    android:layout_width="match_parent"
110                    android:layout_height="wrap_content"
111                    android:clipChildren="false">
112
113                    <HorizontalScrollView
114                        android:id="@+id/color_options_scroll_view"
115                        android:layout_width="match_parent"
116                        android:layout_height="wrap_content"
117                        android:clipChildren="false"
118                        android:scrollbars="none">
119
120                        <LinearLayout
121                            android:id="@+id/color_options"
122                            android:clipToPadding="false"
123                            android:clipChildren="false"
124                            android:paddingHorizontal="16dp"
125                            android:layout_marginBottom="16dp"
126                            android:layout_width="wrap_content"
127                            android:layout_height="wrap_content"
128                            android:orientation="horizontal"
129                            android:divider="@drawable/horizontal_divider_8dp"
130                            android:showDividers="middle" />
131                    </HorizontalScrollView>
132
133                    <!--
134                        This is just an invisible placeholder put in place so that the parent keeps
135                        its height stable as the RecyclerView updates from 0 items to N items.
136                        Keeping it stable allows the layout logic to keep the size of the preview
137                        container stable as well, which bodes well for setting up the SurfaceView
138                        for remote rendering without changing its size after the content is loaded
139                        into the RecyclerView.
140                        -->
141                    <include
142                        layout="@layout/clock_color_option"
143                        android:layout_width="wrap_content"
144                        android:layout_height="wrap_content"
145                        android:visibility="invisible" />
146                </FrameLayout>
147
148                <SeekBar
149                    android:id="@+id/slider"
150                    android:layout_width="match_parent"
151                    android:layout_height="wrap_content"
152                    android:layout_gravity="center_vertical"
153                    android:minHeight="@dimen/accessibility_min_height"
154                    android:thumb="@null"
155                    android:contentDescription="@string/accessibility_clock_slider_description"
156                    android:background="@null"
157                    android:paddingHorizontal="16dp"
158                    android:progressDrawable="@drawable/saturation_progress_drawable"
159                    android:splitTrack="false" />
160            </LinearLayout>
161
162            <RadioGroup
163                android:id="@+id/clock_size_radio_button_group"
164                android:layout_width="match_parent"
165                android:layout_height="wrap_content"
166                android:orientation="vertical"
167                android:layout_marginHorizontal="16dp">
168                <!-- The radio button text is set when binding the view -->
169                <RadioButton android:id="@+id/radio_dynamic"
170                    android:layout_width="wrap_content"
171                    android:layout_height="wrap_content"
172                    android:minHeight="@dimen/accessibility_min_height"
173                    android:paddingStart="8dp"
174                    android:maxLines="3"
175                    android:ellipsize="end"
176                    android:singleLine="false"
177                    android:layout_marginBottom="8dp"/>
178                <!-- The radio button text is set when binding the view -->
179                <RadioButton android:id="@+id/radio_small"
180                    android:layout_width="wrap_content"
181                    android:layout_height="wrap_content"
182                    android:minHeight="@dimen/accessibility_min_height"
183                    android:paddingStart="8dp"
184                    android:maxLines="3"
185                    android:ellipsize="end"
186                    android:singleLine="false" />
187            </RadioGroup>
188        </FrameLayout>
189    </LinearLayout>
190</LinearLayout>
191