• 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
18
19<androidx.constraintlayout.widget.ConstraintLayout
20    xmlns:android="http://schemas.android.com/apk/res/android"
21    xmlns:app="http://schemas.android.com/apk/res-auto"
22    xmlns:tools="http://schemas.android.com/tools"
23    android:id="@+id/theme_preview_card_background"
24    android:layout_width="match_parent"
25    android:layout_height="match_parent"
26    android:clipToPadding="false"
27    android:maxHeight="@dimen/preview_theme_max_height"
28    android:minHeight="@dimen/preview_theme_min_height"
29    android:paddingHorizontal="@dimen/preview_card_padding"
30    android:paddingTop="@dimen/preview_card_top_padding">
31
32        <ViewStub
33            android:id="@+id/theme_preview_top_bar"
34            android:layout_width="match_parent"
35            android:layout_height="wrap_content"
36            android:layout="@layout/theme_preview_topbar"
37            app:layout_constraintBottom_toTopOf="@+id/theme_preview_card_header"
38            app:layout_constraintEnd_toEndOf="parent"
39            app:layout_constraintHorizontal_bias="0.5"
40            app:layout_constraintStart_toStartOf="parent"
41            app:layout_constraintTop_toTopOf="parent"
42            app:layout_constraintVertical_chainStyle="spread_inside"/>
43
44        <TextView
45            android:id="@+id/theme_preview_card_header"
46            android:layout_width="wrap_content"
47            android:layout_height="wrap_content"
48            android:layout_gravity="center_horizontal"
49            android:drawablePadding="@dimen/theme_preview_header_drawable_padding"
50            android:textAppearance="@style/CardTitleTextAppearance"
51            app:layout_constraintBottom_toTopOf="@id/theme_preview_card_body_container"
52            app:layout_constraintEnd_toEndOf="parent"
53            app:layout_constraintHorizontal_bias="0.5"
54            app:layout_constraintStart_toStartOf="parent"
55            app:layout_constraintTop_toBottomOf="@+id/theme_preview_top_bar"
56            app:layout_goneMarginTop="@dimen/card_header_top_margin"
57            app:layout_constraintVertical_chainStyle="spread_inside"
58            tools:text="Default"/>
59
60        <FrameLayout
61            android:id="@+id/theme_preview_card_body_container"
62            android:layout_width="match_parent"
63            android:layout_height="0dp"
64            android:layout_marginHorizontal="8dp"
65            android:layout_marginTop="@dimen/preview_theme_content_margin"
66            app:layout_constraintBottom_toTopOf="@+id/guideline"
67            app:layout_constraintEnd_toEndOf="parent"
68            app:layout_constraintHeight_max="@dimen/preview_theme_content_max_height"
69            app:layout_constraintHeight_min="@dimen/preview_theme_content_min_height"
70            app:layout_constraintHorizontal_bias="0.5"
71            app:layout_constraintStart_toStartOf="parent"
72            app:layout_constraintTop_toBottomOf="@+id/theme_preview_card_header"/>
73
74        <androidx.constraintlayout.widget.Guideline
75            android:id="@+id/guideline"
76            android:layout_width="wrap_content"
77            android:layout_height="wrap_content"
78            android:orientation="horizontal"
79            app:layout_constraintBottom_toTopOf="@+id/edit_label"
80            app:layout_constraintGuide_end="@dimen/preview_theme_content_bottom"
81            app:layout_constraintTop_toBottomOf="@+id/theme_preview_card_body_container"/>
82
83        <TextView
84            android:id="@+id/edit_label"
85            style="@style/EditLabelStyle"
86            android:layout_width="wrap_content"
87            android:layout_height="wrap_content"
88            android:minHeight="@dimen/min_taptarget_height"
89            android:drawableStart="@drawable/ic_tune"
90            android:drawablePadding="8dp"
91            android:gravity="center"
92            android:text="@string/edit_custom_theme_lbl"
93            android:visibility="invisible"
94            app:layout_constraintBottom_toBottomOf="parent"
95            app:layout_constraintEnd_toEndOf="parent"
96            app:layout_constraintHorizontal_bias="0.5"
97            app:layout_constraintStart_toStartOf="parent"
98            app:layout_constraintTop_toBottomOf="@+id/guideline"
99            app:layout_constraintVertical_bias="0.5"/>
100
101</androidx.constraintlayout.widget.ConstraintLayout>
102