1<?xml version="1.0" encoding="utf-8"?>
2<!--
3  ~ Copyright (C) 2023 The Android Open Source Project
4  ~
5  ~ Licensed under the Apache License, Version 2.0 (the "License");
6  ~ you may not use this file except in compliance with the License.
7  ~ You may obtain a copy of the License at
8  ~
9  ~      http://www.apache.org/licenses/LICENSE-2.0
10  ~
11  ~ Unless required by applicable law or agreed to in writing, software
12  ~ distributed under the License is distributed on an "AS IS" BASIS,
13  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  ~ See the License for the specific language governing permissions and
15  ~ limitations under the License.
16-->
17<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
18    xmlns:app="http://schemas.android.com/apk/res-auto"
19    android:layout_width="wrap_content"
20    android:layout_height="wrap_content"
21    android:overScrollMode="never">
22    <androidx.constraintlayout.widget.ConstraintLayout
23        android:layout_width="wrap_content"
24        android:layout_height="wrap_content"
25        android:paddingStart="@dimen/spacing_8dp"
26        android:paddingEnd="@dimen/spacing_8dp"
27        android:paddingBottom="@dimen/set_wallpaper_dialog_bottom_padding"
28        android:layout_gravity="center_horizontal">
29
30        <TextView
31            android:id="@+id/title"
32            style="@style/TextAppearance.SetWallpaperDialog.Title"
33            android:layout_width="wrap_content"
34            android:layout_height="wrap_content"
35            android:text="@string/set_wallpaper_button_text"
36            app:layout_constraintTop_toTopOf="parent"
37            app:layout_constraintStart_toStartOf="parent"
38            app:layout_constraintEnd_toEndOf="parent" />
39
40        <FrameLayout
41            android:id="@+id/preview_container"
42            android:layout_width="wrap_content"
43            android:layout_height="wrap_content"
44            app:layout_constraintTop_toBottomOf="@+id/title"
45            app:layout_constraintBottom_toTopOf="@+id/button_set"
46            app:layout_constraintStart_toStartOf="parent"
47            app:layout_constraintEnd_toEndOf="parent">
48            <include layout="@layout/set_wallpaper_dialog_foldable_preview"
49                android:id="@+id/foldable_previews"
50                android:layout_width="@dimen/set_wallpaper_dialog_foldable_content_width"
51                android:layout_height="wrap_content"
52                android:paddingTop="@dimen/abc_dialog_title_divider_material"
53                android:paddingBottom="@dimen/abc_dialog_title_divider_material"
54                android:visibility="gone"/>
55            <include layout="@layout/set_wallpaper_dialog_handheld_preview"
56                android:id="@+id/handheld_previews"
57                android:layout_width="@dimen/set_wallpaper_dialog_handheld_content_width"
58                android:layout_height="wrap_content"
59                android:paddingTop="@dimen/abc_dialog_title_divider_material"
60                android:paddingBottom="@dimen/abc_dialog_title_divider_material"
61                android:visibility="gone"/>
62        </FrameLayout>
63
64        <Button
65            android:id="@+id/button_set"
66            style="@style/SetWallpaperDialog.Button"
67            android:layout_width="wrap_content"
68            android:layout_height="wrap_content"
69            android:layout_marginVertical="@dimen/set_wallpaper_dialog_button_margin_vertical"
70            android:gravity="center"
71            android:minHeight="@dimen/touch_target_min_height"
72            android:text="@string/set_wallpaper_dialog_set_button"
73            app:layout_constraintBottom_toBottomOf="parent"
74            app:layout_constraintEnd_toEndOf="parent"/>
75
76        <Button
77            android:id="@+id/button_cancel"
78            style="@style/SetWallpaperDialog.Button.OutlinedButton"
79            android:layout_width="wrap_content"
80            android:layout_height="wrap_content"
81            android:layout_marginEnd="@dimen/spacing_8dp"
82            android:layout_marginVertical="@dimen/set_wallpaper_dialog_button_margin_vertical"
83            android:gravity="center"
84            android:minHeight="@dimen/touch_target_min_height"
85            android:text="@string/cancel"
86            app:layout_constraintBottom_toBottomOf="parent"
87            app:layout_constraintEnd_toStartOf="@+id/button_set"/>
88
89    </androidx.constraintlayout.widget.ConstraintLayout>
90</ScrollView>
91