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    <include layout="@layout/section_header"/>
24
25    <FrameLayout
26        android:layout_width="match_parent"
27        android:layout_height="match_parent">
28
29        <androidx.constraintlayout.widget.ConstraintLayout
30            android:id="@+id/content_section"
31            android:layout_width="match_parent"
32            android:layout_height="match_parent">
33
34            <FrameLayout
35                android:id="@+id/preview_card_container"
36                android:layout_width="0dp"
37                android:layout_height="0dp"
38                android:clipToPadding="false"
39                android:paddingTop="@dimen/preview_page_top_margin"
40                android:paddingBottom="@dimen/preview_page_bottom_margin"
41                app:layout_constrainedHeight="true"
42                app:layout_constraintBottom_toTopOf="@+id/options_container"
43                app:layout_constraintEnd_toEndOf="parent"
44                app:layout_constraintStart_toStartOf="parent"
45                app:layout_constraintTop_toTopOf="parent"
46                app:layout_constraintVertical_bias="@dimen/preview_card_vertical_bias">
47
48                <include layout="@layout/grid_preview_card" />
49            </FrameLayout>
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_marginBottom="@dimen/grid_options_container_bottom_margin"
56                android:paddingHorizontal="@dimen/grid_options_container_horizontal_margin"
57                android:clipToPadding="false"
58                app:layout_constraintBottom_toBottomOf="parent"
59                app:layout_constraintEnd_toEndOf="parent"
60                app:layout_constraintStart_toStartOf="parent" />
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        <FrameLayout
72            android:id="@+id/error_section"
73            android:layout_width="match_parent"
74            android:layout_height="match_parent"
75            android:visibility="gone">
76            <TextView
77                android:id="@+id/error_message"
78                style="@style/TitleTextAppearance"
79                android:layout_width="match_parent"
80                android:layout_height="wrap_content"
81                android:layout_gravity="center"
82                android:gravity="center"
83                android:text="@string/something_went_wrong"/>
84        </FrameLayout>
85    </FrameLayout>
86</LinearLayout>
87