1<?xml version="1.0" encoding="utf-8"?>
2<!--
3  ~ Copyright (C) 2024 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    android:id="@+id/interstitial_page"
19    xmlns:android="http://schemas.android.com/apk/res/android"
20    xmlns:app="http://schemas.android.com/apk/res-auto"
21    android:layout_width="match_parent"
22    android:layout_height="match_parent"
23    android:fitsSystemWindows="true"
24    android:transitionGroup="true"
25    android:orientation="vertical">
26
27    <Toolbar
28        android:id="@+id/action_bar"
29        style="?android:attr/actionBarStyle"
30        android:layout_width="match_parent"
31        android:layout_height="wrap_content"
32        android:theme="?android:attr/actionBarTheme"
33        android:elevation="0dp"
34        android:background="@android:color/transparent"/>
35
36    <androidx.constraintlayout.widget.ConstraintLayout
37        android:layout_width="match_parent"
38        android:layout_height="match_parent"
39        android:paddingTop="12dp"
40        android:paddingBottom="24dp"
41        android:paddingHorizontal="24dp"
42        android:clipChildren="true">
43
44        <ScrollView
45            android:layout_width="0dp"
46            android:layout_height="0dp"
47            app:layout_constrainedHeight="true"
48            app:layout_constraintBottom_toTopOf="@+id/enable_mode_button"
49            app:layout_constraintEnd_toStartOf="@+id/guideline"
50            app:layout_constraintStart_toStartOf="parent"
51            app:layout_constraintTop_toTopOf="parent">
52
53            <LinearLayout
54                android:layout_width="match_parent"
55                android:layout_height="wrap_content"
56                android:orientation="vertical"
57                android:paddingEnd="12dp"
58                android:paddingStart="12dp">
59
60                <TextView
61                    android:id="@+id/mode_name_title"
62                    android:layout_width="match_parent"
63                    android:layout_height="wrap_content"
64                    android:clickable="false"
65                    android:paddingVertical="12dp"
66                    android:textSize="36sp"
67                    android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Title" />
68
69                <TextView
70                    android:id="@+id/mode_name_subtitle"
71                    android:layout_width="match_parent"
72                    android:layout_height="wrap_content"
73                    android:clickable="false"
74                    android:paddingBottom="12dp"
75                    android:text="@string/zen_mode_setup_page_summary"
76                    android:textSize="18sp"
77                    android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Subhead" />
78
79            </LinearLayout>
80
81        </ScrollView>
82
83        <Button
84            android:id="@+id/enable_mode_button"
85            style="@style/ActionPrimaryButton"
86            android:layout_width="0dp"
87            android:layout_height="wrap_content"
88            app:layout_constraintStart_toStartOf="parent"
89            app:layout_constraintBottom_toBottomOf="parent"
90            app:layout_constraintEnd_toStartOf="@+id/guideline"
91            android:paddingEnd="12dp" />
92
93        <!-- guideline to have text/button side & image side take up half the page each -->
94        <androidx.constraintlayout.widget.Guideline
95            android:id="@+id/guideline"
96            android:layout_width="wrap_content"
97            android:layout_height="match_parent"
98            android:orientation="vertical"
99            app:layout_constraintGuide_percent="0.5" />
100
101        <FrameLayout
102            android:id="@+id/image_frame"
103            android:layout_height="0dp"
104            android:layout_width="0dp"
105            app:layout_constraintTop_toTopOf="parent"
106            app:layout_constraintBottom_toBottomOf="parent"
107            app:layout_constraintStart_toEndOf="@+id/guideline"
108            app:layout_constraintEnd_toEndOf="parent"
109            android:paddingHorizontal="12dp">
110
111            <ImageView
112                android:id="@+id/image"
113                android:clickable="false"
114                android:layout_width="match_parent"
115                android:layout_height="match_parent"
116                android:adjustViewBounds="true"
117                android:scaleType="fitCenter"
118                android:layout_gravity="center" />
119
120        </FrameLayout>
121
122 />
123
124    </androidx.constraintlayout.widget.ConstraintLayout>
125
126</LinearLayout>