• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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    android:background="?android:colorPrimary">
24    <include layout="@layout/section_header"/>
25
26    <androidx.constraintlayout.widget.ConstraintLayout
27        android:layout_width="match_parent"
28        android:layout_height="match_parent">
29
30        <FrameLayout
31            android:id="@+id/component_preview_container"
32            android:layout_width="match_parent"
33            android:layout_height="0dp"
34            android:background="?android:colorPrimary"
35            app:layout_constrainedHeight="true"
36            app:layout_constraintBottom_toTopOf="@+id/guideline"
37            app:layout_constraintEnd_toEndOf="parent"
38            app:layout_constraintHeight_max="@dimen/preview_pager_max_height"
39            app:layout_constraintHorizontal_bias="0.5"
40            app:layout_constraintStart_toStartOf="parent"
41            app:layout_constraintTop_toTopOf="parent"
42            app:layout_constraintVertical_bias="0.0">
43
44            <include
45                android:id="@+id/component_preview_content"
46                layout="@layout/theme_component_preview"
47                android:layout_width="match_parent"
48                android:layout_height="match_parent"
49                android:layout_gravity="center_vertical"
50                android:layout_marginHorizontal="@dimen/preview_page_horizontal_margin"
51                android:layout_marginTop="@dimen/preview_page_top_margin"/>
52        </FrameLayout>
53        <View
54            android:id="@+id/divider"
55            android:layout_width="match_parent"
56            android:layout_height="1dp"
57            android:background="@color/divider_color"
58            app:layout_constraintEnd_toEndOf="parent"
59            app:layout_constraintStart_toStartOf="parent"
60            app:layout_constraintTop_toBottomOf="@+id/component_preview_container"/>
61
62        <androidx.constraintlayout.widget.Guideline
63            android:id="@+id/guideline"
64            android:layout_width="wrap_content"
65            android:layout_height="wrap_content"
66            android:orientation="horizontal"
67            app:layout_constraintGuide_percent=".7"/>
68
69
70        <TextView
71            android:id="@+id/component_options_title"
72            android:layout_width="match_parent"
73            android:layout_height="wrap_content"
74            android:layout_marginTop="10dp"
75            android:layout_marginStart="10dp"
76            android:layout_marginEnd="10dp"
77            android:layout_marginBottom="10dp"
78            android:textAlignment="center"
79            android:textAppearance="@style/HeaderTextAppearance"
80            android:textSize="@dimen/component_options_title_size"
81            app:layout_constraintEnd_toEndOf="parent"
82            app:layout_constraintStart_toStartOf="parent"
83            app:layout_constraintTop_toBottomOf="@+id/component_preview_container"
84            app:layout_constraintBottom_toBottomOf="parent"
85            app:layout_constraintVertical_bias=".15"/>
86
87        <androidx.recyclerview.widget.RecyclerView
88            android:id="@+id/options_container"
89            android:layout_width="match_parent"
90            android:layout_height="@dimen/options_container_height"
91            android:layout_gravity="center_horizontal"
92            app:layout_constraintBottom_toBottomOf="parent"
93            app:layout_constraintEnd_toEndOf="parent"
94            app:layout_constraintHorizontal_bias="0.5"
95            app:layout_constraintStart_toStartOf="parent"
96            app:layout_constraintTop_toBottomOf="@+id/component_options_title"
97            app:layout_constraintVertical_bias=".25"/>
98
99    </androidx.constraintlayout.widget.ConstraintLayout>
100</LinearLayout>
101