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