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/theme_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="bottom|center_horizontal" 56 android:layout_marginTop="10dp" 57 android:layout_weight="1" 58 app:layout_constraintBottom_toTopOf="@id/use_my_wallpaper" 59 app:layout_constraintEnd_toEndOf="parent" 60 app:layout_constraintStart_toStartOf="parent" 61 app:layout_constraintTop_toTopOf="parent" 62 app:layout_constraintVertical_bias="1.0" /> 63 64 <CheckBox 65 android:id="@+id/use_my_wallpaper" 66 android:layout_width="wrap_content" 67 android:layout_height="@dimen/min_taptarget_height" 68 android:layout_marginStart="10dp" 69 android:ellipsize="end" 70 android:gravity="start|center_vertical" 71 android:paddingLeft="4dp" 72 android:text="@string/keep_my_wallpaper" 73 app:layout_constraintBottom_toTopOf="@id/apply_button" 74 app:layout_constraintEnd_toEndOf="parent" 75 app:layout_constraintHeight_min="@dimen/min_taptarget_height" 76 app:layout_constraintHorizontal_bias="0.0" 77 app:layout_constraintStart_toStartOf="parent" 78 app:layout_constraintTop_toBottomOf="@id/options_container" 79 app:layout_constraintVertical_bias="1.0" /> 80 81 <Button 82 android:id="@+id/apply_button" 83 style="@style/ActionPrimaryButton" 84 android:layout_width="wrap_content" 85 android:layout_height="wrap_content" 86 android:layout_gravity="end" 87 android:layout_marginEnd="10dp" 88 android:layout_marginBottom="10dp" 89 android:text="@string/apply_theme_btn" 90 app:layout_constraintBottom_toBottomOf="parent" 91 app:layout_constraintEnd_toEndOf="parent" /> 92 </androidx.constraintlayout.widget.ConstraintLayout> 93 </FrameLayout> 94 95 <FrameLayout 96 android:layout_width="match_parent" 97 android:layout_height="match_parent"> 98 99 <androidx.core.widget.ContentLoadingProgressBar 100 android:id="@+id/loading_indicator" 101 style="@android:style/Widget.DeviceDefault.ProgressBar" 102 android:layout_width="wrap_content" 103 android:layout_height="wrap_content" 104 android:layout_gravity="center_horizontal|top" 105 android:layout_marginTop="200dp" 106 android:indeterminate="true" /> 107 108 <FrameLayout 109 android:id="@+id/error_section" 110 android:layout_width="match_parent" 111 android:layout_height="match_parent" 112 android:visibility="gone"> 113 114 <TextView 115 android:id="@+id/error_message" 116 style="@style/TitleTextAppearance" 117 android:layout_width="match_parent" 118 android:layout_height="wrap_content" 119 android:layout_gravity="center" 120 android:gravity="center" 121 android:text="@string/something_went_wrong" /> 122 </FrameLayout> 123 </FrameLayout> 124</androidx.coordinatorlayout.widget.CoordinatorLayout> 125