blob: d15d93fd0d3b7e44f4f7459b5e16c75d6b96cbbd [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
Chuck Liaoa35ce9d2020-02-11 19:38:37 +080035 <com.android.wallpaper.widget.PreviewPager
Santiago Etchebehere5818e782019-05-24 11:15:34 -070036 android:id="@+id/theme_preview_pager"
37 android:layout_width="match_parent"
38 android:layout_height="wrap_content"
Santiago Etchebehere0f074b02019-06-03 16:29:41 -070039 android:background="@color/preview_pager_background"
Santiago Etchebehere5818e782019-05-24 11:15:34 -070040 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"
Santiago Etchebehere5818e782019-05-24 11:15:34 -070044 app:layout_constraintStart_toStartOf="parent"
45 app:layout_constraintTop_toTopOf="parent"
46 app:layout_constraintVertical_bias="0.0"
47 app:layout_constraintVertical_chainStyle="spread_inside"/>
Santiago Etchebehere10e79f12018-12-19 15:53:42 -080048
Santiago Etchebehere5818e782019-05-24 11:15:34 -070049 <androidx.recyclerview.widget.RecyclerView
50 android:id="@+id/options_container"
51 android:layout_width="match_parent"
52 android:layout_height="@dimen/options_container_height"
53 android:layout_gravity="bottom|center_horizontal"
54 android:layout_marginTop="10dp"
55 android:layout_weight="1"
Santiago Etchebehere5818e782019-05-24 11:15:34 -070056 app:layout_constraintEnd_toEndOf="parent"
57 app:layout_constraintStart_toStartOf="parent"
58 app:layout_constraintTop_toBottomOf="@+id/theme_preview_pager"
59 app:layout_constraintVertical_bias="1.0"/>
Santiago Etchebehere60c3f2f2019-05-22 14:38:19 -070060
Santiago Etchebehere5818e782019-05-24 11:15:34 -070061 <Button
62 android:id="@+id/apply_button"
63 style="@style/ActionPrimaryButton"
64 android:layout_width="wrap_content"
65 android:layout_height="wrap_content"
66 android:layout_gravity="end"
67 android:layout_marginEnd="10dp"
68 android:layout_marginBottom="10dp"
69 android:text="@string/apply_theme_btn"
70 app:layout_constraintBottom_toBottomOf="parent"
71 app:layout_constraintEnd_toEndOf="parent"/>
72 </androidx.constraintlayout.widget.ConstraintLayout>
73
74 <androidx.core.widget.ContentLoadingProgressBar
75 android:id="@+id/loading_indicator"
76 style="@android:style/Widget.DeviceDefault.ProgressBar"
Santiago Etchebehere60c3f2f2019-05-22 14:38:19 -070077 android:layout_width="wrap_content"
Amin Shaikh06972d82019-04-19 16:29:01 -040078 android:layout_height="wrap_content"
Santiago Etchebehere5818e782019-05-24 11:15:34 -070079 android:layout_marginTop="200dp"
80 android:layout_gravity="center_horizontal|top"
81 android:indeterminate="true"/>
Santiago Etchebehere10e79f12018-12-19 15:53:42 -080082
Santiago Etchebehere5818e782019-05-24 11:15:34 -070083 <FrameLayout
84 android:id="@+id/error_section"
85 android:layout_width="match_parent"
86 android:layout_height="match_parent"
87 android:visibility="gone">
88 <TextView
89 android:id="@+id/error_message"
Santiago Etchebehere58e1b522019-12-05 10:25:13 -080090 style="@style/TitleTextAppearance"
Santiago Etchebehere5818e782019-05-24 11:15:34 -070091 android:layout_width="match_parent"
92 android:layout_height="wrap_content"
93 android:layout_gravity="center"
94 android:gravity="center"
95 android:text="@string/something_went_wrong"/>
96 </FrameLayout>
97 </FrameLayout>
Santiago Etchebehere10e79f12018-12-19 15:53:42 -080098</LinearLayout>