1<?xml version="1.0" encoding="utf-8"?> 2<!-- 3 Copyright (C) 2020 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<androidx.coordinatorlayout.widget.CoordinatorLayout 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:background="?android:colorPrimary" 23 android:orientation="vertical"> 24 25 <include layout="@layout/section_header" /> 26 27 <FrameLayout 28 android:layout_width="wrap_content" 29 android:layout_height="wrap_content" 30 app:layout_behavior="@string/scalable_container_behavior"> 31 32 <com.android.wallpaper.widget.PreviewPager 33 android:id="@+id/clock_preview_pager" 34 android:layout_width="match_parent" 35 android:layout_height="wrap_content" 36 android:background="@color/preview_pager_background" /> 37 </FrameLayout> 38 39 <FrameLayout 40 android:id="@+id/scalable_content_container" 41 android:layout_width="wrap_content" 42 android:layout_height="@dimen/content_container_maximum_height" 43 app:behavior_peekHeight="@dimen/content_container_minimum_height" 44 app:layout_behavior="@string/bottom_sheet_behavior"> 45 46 <androidx.constraintlayout.widget.ConstraintLayout 47 android:id="@+id/content_section" 48 android:layout_width="match_parent" 49 android:layout_height="match_parent"> 50 51 <androidx.recyclerview.widget.RecyclerView 52 android:id="@+id/options_container" 53 android:layout_width="match_parent" 54 android:layout_height="@dimen/options_container_height" 55 android:layout_gravity="center_horizontal" 56 android:layout_marginTop="10dp" 57 app:layout_constraintBottom_toTopOf="@id/placeholder" 58 app:layout_constraintEnd_toEndOf="parent" 59 app:layout_constraintStart_toStartOf="parent" 60 app:layout_constraintTop_toTopOf="parent" 61 app:layout_constraintVertical_bias="1.0" /> 62 63 <Space 64 android:id="@+id/placeholder" 65 android:layout_width="match_parent" 66 android:layout_height="@dimen/min_taptarget_height" 67 app:layout_constraintBottom_toTopOf="@id/apply_button" 68 app:layout_constraintEnd_toEndOf="parent" 69 app:layout_constraintHeight_min="@dimen/min_taptarget_height" 70 app:layout_constraintHorizontal_bias="0.0" 71 app:layout_constraintStart_toStartOf="parent" 72 app:layout_constraintTop_toBottomOf="@id/options_container" 73 app:layout_constraintVertical_bias="1.0" /> 74 75 <Button 76 android:id="@+id/apply_button" 77 style="@style/ActionPrimaryButton" 78 android:layout_width="wrap_content" 79 android:layout_height="wrap_content" 80 android:layout_gravity="end" 81 android:layout_marginVertical="10dp" 82 android:layout_marginEnd="10dp" 83 android:layout_weight="1" 84 android:text="@string/apply_theme_btn" 85 app:layout_constraintBottom_toBottomOf="parent" 86 app:layout_constraintEnd_toEndOf="parent" /> 87 </androidx.constraintlayout.widget.ConstraintLayout> 88 </FrameLayout> 89 90 <FrameLayout 91 android:layout_width="match_parent" 92 android:layout_height="match_parent"> 93 94 <androidx.core.widget.ContentLoadingProgressBar 95 android:id="@+id/loading_indicator" 96 style="@android:style/Widget.DeviceDefault.ProgressBar" 97 android:layout_width="wrap_content" 98 android:layout_height="wrap_content" 99 android:layout_gravity="center_horizontal|top" 100 android:layout_marginTop="200dp" 101 android:indeterminate="true" /> 102 103 <FrameLayout 104 android:id="@+id/error_section" 105 android:layout_width="match_parent" 106 android:layout_height="match_parent" 107 android:visibility="gone"> 108 109 <TextView 110 android:id="@+id/error_message" 111 style="@style/TitleTextAppearance" 112 android:layout_width="match_parent" 113 android:layout_height="wrap_content" 114 android:layout_gravity="center" 115 android:gravity="center" 116 android:text="@string/something_went_wrong" /> 117 </FrameLayout> 118 </FrameLayout> 119</androidx.coordinatorlayout.widget.CoordinatorLayout> 120