1<?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 xmlns:android="http://schemas.android.com/apk/res/android" 18 xmlns:app="http://schemas.android.com/apk/res-auto" 19 android:layout_width="match_parent" 20 android:layout_height="match_parent" 21 android:orientation="vertical"> 22 <include layout="@layout/section_header"/> 23 24 <FrameLayout 25 android:layout_width="match_parent" 26 android:layout_height="match_parent"> 27 28 <androidx.constraintlayout.widget.ConstraintLayout 29 android:id="@+id/content_section" 30 android:layout_width="match_parent" 31 android:layout_height="match_parent"> 32 <FrameLayout 33 android:id="@+id/preview_card_container" 34 android:layout_width="match_parent" 35 android:layout_height="0dp" 36 android:paddingTop="@dimen/preview_content_padding_top" 37 android:paddingBottom="@dimen/preview_content_padding_bottom" 38 android:clipToPadding="false" 39 app:layout_constrainedHeight="true" 40 app:layout_constraintStart_toStartOf="parent" 41 app:layout_constraintEnd_toEndOf="parent" 42 app:layout_constraintTop_toTopOf="parent" 43 app:layout_constraintBottom_toTopOf="@id/options_container" 44 app:layout_constraintHeight_max="@dimen/preview_pager_max_height" 45 app:layout_constraintVertical_bias="0.0" 46 app:layout_constraintHeight_percent="@dimen/preview_pager_maximum_height_ratio"> 47 <include layout="@layout/theme_preview_card"/> 48 </FrameLayout> 49 50 <androidx.recyclerview.widget.RecyclerView 51 android:id="@+id/options_container" 52 android:layout_width="match_parent" 53 android:layout_height="0dp" 54 android:layout_gravity="bottom|center_horizontal" 55 android:layout_marginTop="10dp" 56 app:layout_constraintStart_toStartOf="parent" 57 app:layout_constraintEnd_toEndOf="parent" 58 app:layout_constraintTop_toBottomOf="@+id/preview_card_container" 59 app:layout_constraintBottom_toBottomOf="parent" 60 app:layout_constraintVertical_bias="1.0"/> 61 </androidx.constraintlayout.widget.ConstraintLayout> 62 63 <androidx.core.widget.ContentLoadingProgressBar 64 android:id="@+id/loading_indicator" 65 style="@android:style/Widget.DeviceDefault.ProgressBar" 66 android:layout_width="wrap_content" 67 android:layout_height="wrap_content" 68 android:layout_marginTop="200dp" 69 android:layout_gravity="center_horizontal|top" 70 android:indeterminate="true"/> 71 72 <FrameLayout 73 android:id="@+id/error_section" 74 android:layout_width="match_parent" 75 android:layout_height="match_parent" 76 android:visibility="gone"> 77 <TextView 78 android:id="@+id/error_message" 79 style="@style/TitleTextAppearance" 80 android:layout_width="match_parent" 81 android:layout_height="wrap_content" 82 android:layout_gravity="center" 83 android:gravity="center" 84 android:text="@string/something_went_wrong"/> 85 </FrameLayout> 86 </FrameLayout> 87</LinearLayout> 88