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/grid_preview_pager" 34 android:layout_width="match_parent" 35 android:layout_height="wrap_content" 36 android:background="@color/preview_pager_background" 37 app:card_style="screen_aspect_ratio" /> 38 </FrameLayout> 39 40 <FrameLayout 41 android:id="@+id/scalable_content_container" 42 android:layout_width="wrap_content" 43 android:layout_height="@dimen/content_container_maximum_height" 44 app:behavior_peekHeight="@dimen/content_container_minimum_height" 45 app:layout_behavior="@string/bottom_sheet_behavior"> 46 47 <androidx.constraintlayout.widget.ConstraintLayout 48 android:id="@+id/content_section" 49 android:layout_width="match_parent" 50 android:layout_height="match_parent"> 51 52 <androidx.recyclerview.widget.RecyclerView 53 android:id="@+id/options_container" 54 android:layout_width="match_parent" 55 android:layout_height="@dimen/options_container_height" 56 android:layout_gravity="center_horizontal" 57 android:layout_marginTop="10dp" 58 app:layout_constraintBottom_toTopOf="@id/placeholder" 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 <Space 65 android:id="@+id/placeholder" 66 android:layout_width="match_parent" 67 android:layout_height="@dimen/min_taptarget_height" 68 app:layout_constraintBottom_toTopOf="@id/apply_button" 69 app:layout_constraintStart_toStartOf="parent" 70 app:layout_constraintTop_toBottomOf="@id/options_container" 71 app:layout_constraintVertical_bias="1.0" /> 72 73 <Button 74 android:id="@+id/apply_button" 75 style="@style/ActionPrimaryButton" 76 android:layout_width="wrap_content" 77 android:layout_height="wrap_content" 78 android:layout_gravity="end" 79 android:layout_marginVertical="10dp" 80 android:layout_marginEnd="10dp" 81 android:layout_weight="1" 82 android:text="@string/apply_theme_btn" 83 app:layout_constraintBottom_toBottomOf="parent" 84 app:layout_constraintEnd_toEndOf="parent" /> 85 86 </androidx.constraintlayout.widget.ConstraintLayout> 87 </FrameLayout> 88 89 <FrameLayout 90 android:layout_width="match_parent" 91 android:layout_height="match_parent"> 92 93 <androidx.core.widget.ContentLoadingProgressBar 94 android:id="@+id/loading_indicator" 95 style="@android:style/Widget.DeviceDefault.ProgressBar" 96 android:layout_width="wrap_content" 97 android:layout_height="wrap_content" 98 android:layout_gravity="center_horizontal|top" 99 android:layout_marginTop="200dp" 100 android:indeterminate="true" /> 101 102 <FrameLayout 103 android:id="@+id/error_section" 104 android:layout_width="match_parent" 105 android:layout_height="match_parent" 106 android:visibility="gone"> 107 108 <TextView 109 android:id="@+id/error_message" 110 style="@style/TitleTextAppearance" 111 android:layout_width="match_parent" 112 android:layout_height="wrap_content" 113 android:layout_gravity="center" 114 android:gravity="center" 115 android:text="@string/something_went_wrong" /> 116 </FrameLayout> 117 </FrameLayout> 118</androidx.coordinatorlayout.widget.CoordinatorLayout> 119