blob: 893be46c7b431c2259e1a232f68039ddc4cdd25c [file] [log] [blame]
Santiago Etchebehere10e79f12018-12-19 15:53:42 -08001<?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-->
chihhangchuang9c84ab42020-05-25 18:44:01 +080017<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
18 xmlns:app="http://schemas.android.com/apk/res-auto"
Santiago Etchebehere10e79f12018-12-19 15:53:42 -080019 android:layout_width="match_parent"
20 android:layout_height="match_parent"
Chuck Liao350a85f2021-01-21 23:32:25 +080021 android:orientation="vertical">
Santiago Etchebehere10e79f12018-12-19 15:53:42 -080022 <include layout="@layout/section_header"/>
23
Santiago Etchebehere5818e782019-05-24 11:15:34 -070024 <FrameLayout
Santiago Etchebehere988f99d2018-12-20 17:13:12 -080025 android:layout_width="match_parent"
Santiago Etchebehere60c3f2f2019-05-22 14:38:19 -070026 android:layout_height="match_parent">
Santiago Etchebehere10e79f12018-12-19 15:53:42 -080027
chihhangchuang9c84ab42020-05-25 18:44:01 +080028 <androidx.constraintlayout.widget.ConstraintLayout
Santiago Etchebehere5818e782019-05-24 11:15:34 -070029 android:id="@+id/content_section"
Santiago Etchebehere60c3f2f2019-05-22 14:38:19 -070030 android:layout_width="match_parent"
chihhangchuang9c84ab42020-05-25 18:44:01 +080031 android:layout_height="match_parent">
chihhangchuang05428e92020-05-12 22:33:36 +080032 <FrameLayout
33 android:id="@+id/preview_card_container"
34 android:layout_width="match_parent"
chihhangchuang9c84ab42020-05-25 18:44:01 +080035 android:layout_height="0dp"
chihhangchuang05428e92020-05-12 22:33:36 +080036 android:paddingTop="@dimen/preview_content_padding_top"
37 android:paddingBottom="@dimen/preview_content_padding_bottom"
38 android:clipToPadding="false"
chihhangchuang9c84ab42020-05-25 18:44:01 +080039 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"
chihhangchuang079839f2020-05-25 21:59:48 +080046 app:layout_constraintHeight_percent="@dimen/preview_pager_maximum_height_ratio">
chihhangchuang16c2eb22020-05-25 22:32:52 +080047 <include layout="@layout/theme_preview_card"/>
chihhangchuang05428e92020-05-12 22:33:36 +080048 </FrameLayout>
49
Santiago Etchebehere5818e782019-05-24 11:15:34 -070050 <androidx.recyclerview.widget.RecyclerView
51 android:id="@+id/options_container"
52 android:layout_width="match_parent"
chihhangchuang05428e92020-05-12 22:33:36 +080053 android:layout_height="0dp"
Santiago Etchebehere5818e782019-05-24 11:15:34 -070054 android:layout_gravity="bottom|center_horizontal"
55 android:layout_marginTop="10dp"
Chuck Liao350a85f2021-01-21 23:32:25 +080056 android:background="?android:colorPrimary"
chihhangchuang9c84ab42020-05-25 18:44:01 +080057 app:layout_constraintStart_toStartOf="parent"
58 app:layout_constraintEnd_toEndOf="parent"
59 app:layout_constraintTop_toBottomOf="@+id/preview_card_container"
60 app:layout_constraintBottom_toBottomOf="parent"
61 app:layout_constraintVertical_bias="1.0"/>
62 </androidx.constraintlayout.widget.ConstraintLayout>
Santiago Etchebehere5818e782019-05-24 11:15:34 -070063
64 <androidx.core.widget.ContentLoadingProgressBar
65 android:id="@+id/loading_indicator"
66 style="@android:style/Widget.DeviceDefault.ProgressBar"
Santiago Etchebehere60c3f2f2019-05-22 14:38:19 -070067 android:layout_width="wrap_content"
Amin Shaikh06972d82019-04-19 16:29:01 -040068 android:layout_height="wrap_content"
Santiago Etchebehere5818e782019-05-24 11:15:34 -070069 android:layout_marginTop="200dp"
70 android:layout_gravity="center_horizontal|top"
71 android:indeterminate="true"/>
Santiago Etchebehere10e79f12018-12-19 15:53:42 -080072
Santiago Etchebehere5818e782019-05-24 11:15:34 -070073 <FrameLayout
74 android:id="@+id/error_section"
75 android:layout_width="match_parent"
76 android:layout_height="match_parent"
77 android:visibility="gone">
78 <TextView
79 android:id="@+id/error_message"
Santiago Etchebehere58e1b522019-12-05 10:25:13 -080080 style="@style/TitleTextAppearance"
Santiago Etchebehere5818e782019-05-24 11:15:34 -070081 android:layout_width="match_parent"
82 android:layout_height="wrap_content"
83 android:layout_gravity="center"
84 android:gravity="center"
85 android:text="@string/something_went_wrong"/>
86 </FrameLayout>
87 </FrameLayout>
Santiago Etchebehere10e79f12018-12-19 15:53:42 -080088</LinearLayout>