• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3     Copyright (C) 2019 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"
19    xmlns:app="http://schemas.android.com/apk/res-auto"
20    android:layout_width="match_parent"
21    android:layout_height="match_parent"
22    android:orientation="vertical"
23    android:background="?android:colorPrimary">
24    <include layout="@layout/section_header"/>
25
26    <FrameLayout
27        android:layout_width="match_parent"
28        android:layout_height="match_parent">
29
30        <androidx.constraintlayout.widget.ConstraintLayout
31            android:id="@+id/content_section"
32            android:layout_width="match_parent"
33            android:layout_height="match_parent">
34
35            <com.android.wallpaper.widget.PreviewPager
36                android:id="@+id/clock_preview_pager"
37                android:layout_width="match_parent"
38                android:layout_height="wrap_content"
39                android:background="?android:colorSecondary"
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_constraintVertical_bias="0.0"
46                app:layout_constraintStart_toStartOf="parent"
47                app:layout_constraintTop_toTopOf="parent"
48                app:layout_constraintVertical_chainStyle="spread_inside"/>
49
50            <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="center_horizontal"
55                android:layout_marginTop="10dp"
56                app:layout_constraintBottom_toTopOf="@id/placeholder"
57                app:layout_constraintEnd_toEndOf="parent"
58                app:layout_constraintStart_toStartOf="parent"
59                app:layout_constraintTop_toBottomOf="@+id/clock_preview_pager"
60                app:layout_constraintVertical_bias="1.0"/>
61
62            <Space
63                android:id="@+id/placeholder"
64                android:layout_width="match_parent"
65                android:layout_height="@dimen/min_taptarget_height"
66                app:layout_constraintBottom_toTopOf="@id/apply_button"
67                app:layout_constraintEnd_toEndOf="parent"
68                app:layout_constraintHeight_min="@dimen/min_taptarget_height"
69                app:layout_constraintHorizontal_bias="0.0"
70                app:layout_constraintStart_toStartOf="parent"
71                app:layout_constraintTop_toBottomOf="@id/options_container"
72                app:layout_constraintVertical_bias="1.0"/>
73
74            <Button
75                android:id="@+id/apply_button"
76                style="@style/ActionPrimaryButton"
77                android:layout_width="wrap_content"
78                android:layout_height="wrap_content"
79                android:layout_gravity="end"
80                android:layout_marginEnd="10dp"
81                android:layout_marginVertical="10dp"
82                android:layout_weight="1"
83                android:text="@string/apply_theme_btn"
84                app:layout_constraintBottom_toBottomOf="parent"
85                app:layout_constraintEnd_toEndOf="parent"/>
86        </androidx.constraintlayout.widget.ConstraintLayout>
87
88        <androidx.core.widget.ContentLoadingProgressBar
89            android:id="@+id/loading_indicator"
90            style="@android:style/Widget.DeviceDefault.ProgressBar"
91            android:layout_width="wrap_content"
92            android:layout_height="wrap_content"
93            android:layout_marginTop="200dp"
94            android:layout_gravity="center_horizontal|top"
95            android:indeterminate="true"/>
96        <FrameLayout
97            android:id="@+id/error_section"
98            android:layout_width="match_parent"
99            android:layout_height="match_parent"
100            android:visibility="gone">
101            <TextView
102                android:id="@+id/error_message"
103                style="@style/TitleTextAppearance"
104                android:layout_width="match_parent"
105                android:layout_height="wrap_content"
106                android:layout_gravity="center"
107                android:gravity="center"
108                android:text="@string/something_went_wrong"/>
109        </FrameLayout>
110    </FrameLayout>
111</LinearLayout>
112