blob: dbb633eafe21935c8437cfb80f8c01af7557557c [file] [log] [blame]
Santiago Etchebehere10e79f12018-12-19 15:53:42 -08001<?xml version="1.0" encoding="utf-8"?>
2<!--
3 Copyright (C) 2018 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<LinearLayout
18 xmlns:android="http://schemas.android.com/apk/res/android"
Santiago Etchebehere60c3f2f2019-05-22 14:38:19 -070019 xmlns:app="http://schemas.android.com/apk/res-auto"
Santiago Etchebehere10e79f12018-12-19 15:53:42 -080020 android:layout_width="match_parent"
21 android:layout_height="match_parent"
22 android:orientation="vertical"
Santiago Etchebehereeb186982019-01-31 14:49:06 -080023 android:background="?android:colorPrimary">
Santiago Etchebehere10e79f12018-12-19 15:53:42 -080024 <include layout="@layout/section_header"/>
25
Santiago Etchebehere5818e782019-05-24 11:15:34 -070026 <FrameLayout
Santiago Etchebehere988f99d2018-12-20 17:13:12 -080027 android:layout_width="match_parent"
Santiago Etchebehere60c3f2f2019-05-22 14:38:19 -070028 android:layout_height="match_parent">
Santiago Etchebehere10e79f12018-12-19 15:53:42 -080029
Santiago Etchebehere5818e782019-05-24 11:15:34 -070030 <androidx.constraintlayout.widget.ConstraintLayout
31 android:id="@+id/content_section"
Santiago Etchebehere60c3f2f2019-05-22 14:38:19 -070032 android:layout_width="match_parent"
Santiago Etchebehere5818e782019-05-24 11:15:34 -070033 android:layout_height="match_parent">
Santiago Etchebehere10e79f12018-12-19 15:53:42 -080034
Santiago Etchebehere5818e782019-05-24 11:15:34 -070035 <com.android.customization.widget.PreviewPager
36 android:id="@+id/theme_preview_pager"
37 android:layout_width="match_parent"
38 android:layout_height="wrap_content"
39 android:background="@color/secondary_color"
40 app:layout_constrainedHeight="true"
41 app:layout_constraintBottom_toTopOf="@id/options_container"
42 app:layout_constraintEnd_toEndOf="parent"
43 app:layout_constraintHeight_max="@dimen/preview_pager_max_height"
44 app:layout_constraintHeight_min="@dimen/preview_pager_min_height"
45 app:layout_constraintStart_toStartOf="parent"
46 app:layout_constraintTop_toTopOf="parent"
47 app:layout_constraintVertical_bias="0.0"
48 app:layout_constraintVertical_chainStyle="spread_inside"/>
Santiago Etchebehere10e79f12018-12-19 15:53:42 -080049
Santiago Etchebehere5818e782019-05-24 11:15:34 -070050 <androidx.recyclerview.widget.RecyclerView
51 android:id="@+id/options_container"
52 android:layout_width="match_parent"
53 android:layout_height="@dimen/options_container_height"
54 android:layout_gravity="bottom|center_horizontal"
55 android:layout_marginTop="10dp"
56 android:layout_weight="1"
57 app:layout_constraintBottom_toTopOf="@id/use_my_wallpaper"
58 app:layout_constraintEnd_toEndOf="parent"
59 app:layout_constraintStart_toStartOf="parent"
60 app:layout_constraintTop_toBottomOf="@+id/theme_preview_pager"
61 app:layout_constraintVertical_bias="1.0"/>
Santiago Etchebehere60c3f2f2019-05-22 14:38:19 -070062
Santiago Etchebehere5818e782019-05-24 11:15:34 -070063 <CheckBox
64 android:id="@+id/use_my_wallpaper"
65 android:layout_width="wrap_content"
66 android:layout_height="@dimen/min_taptarget_height"
67 android:layout_marginStart="10dp"
68 android:ellipsize="end"
69 android:gravity="start|center_vertical"
70 android:paddingLeft="4dp"
71 android:text="@string/keep_my_wallpaper"
72 app:layout_constraintBottom_toTopOf="@id/apply_button"
73 app:layout_constraintEnd_toEndOf="parent"
74 app:layout_constraintHeight_min="@dimen/min_taptarget_height"
75 app:layout_constraintHorizontal_bias="0.0"
76 app:layout_constraintStart_toStartOf="parent"
77 app:layout_constraintTop_toBottomOf="@id/options_container"
78 app:layout_constraintVertical_bias="1.0"/>
79
80 <Button
81 android:id="@+id/apply_button"
82 style="@style/ActionPrimaryButton"
83 android:layout_width="wrap_content"
84 android:layout_height="wrap_content"
85 android:layout_gravity="end"
86 android:layout_marginEnd="10dp"
87 android:layout_marginBottom="10dp"
88 android:text="@string/apply_theme_btn"
89 app:layout_constraintBottom_toBottomOf="parent"
90 app:layout_constraintEnd_toEndOf="parent"/>
91 </androidx.constraintlayout.widget.ConstraintLayout>
92
93 <androidx.core.widget.ContentLoadingProgressBar
94 android:id="@+id/loading_indicator"
95 style="@android:style/Widget.DeviceDefault.ProgressBar"
Santiago Etchebehere60c3f2f2019-05-22 14:38:19 -070096 android:layout_width="wrap_content"
Amin Shaikh06972d82019-04-19 16:29:01 -040097 android:layout_height="wrap_content"
Santiago Etchebehere5818e782019-05-24 11:15:34 -070098 android:layout_marginTop="200dp"
99 android:layout_gravity="center_horizontal|top"
100 android:indeterminate="true"/>
Santiago Etchebehere10e79f12018-12-19 15:53:42 -0800101
Santiago Etchebehere5818e782019-05-24 11:15:34 -0700102 <FrameLayout
103 android:id="@+id/error_section"
104 android:layout_width="match_parent"
105 android:layout_height="match_parent"
106 android:visibility="gone">
107 <TextView
108 android:id="@+id/error_message"
109 style="@style/HeaderTextAppearance"
110 android:layout_width="match_parent"
111 android:layout_height="wrap_content"
112 android:layout_gravity="center"
113 android:gravity="center"
114 android:text="@string/something_went_wrong"/>
115 </FrameLayout>
116 </FrameLayout>
Santiago Etchebehere10e79f12018-12-19 15:53:42 -0800117</LinearLayout>