1<?xml version="1.0" encoding="utf-8"?>
2<!--
3  Copyright (C) 2020 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 xmlns:android="http://schemas.android.com/apk/res/android"
18    xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
19    android:layout_width="match_parent"
20    android:layout_height="wrap_content"
21    android:orientation="vertical">
22
23    <!-- Scrollview is necessary to fit everything in landscape layout -->
24    <ScrollView
25        android:layout_width="match_parent"
26        android:layout_height="wrap_content">
27
28        <LinearLayout
29            android:layout_width="match_parent"
30            android:layout_height="wrap_content"
31            android:paddingStart="@dimen/dialog_side_padding"
32            android:paddingEnd="@dimen/dialog_side_padding"
33            android:paddingTop="@dimen/dialog_top_padding"
34            android:paddingBottom="@dimen/dialog_bottom_padding"
35            android:orientation="vertical">
36
37            <!-- Header -->
38            <LinearLayout
39                android:layout_width="match_parent"
40                android:layout_height="match_parent"
41                android:orientation="vertical"
42                android:gravity="center">
43                <ImageView
44                    android:layout_width="@dimen/screenrecord_logo_size"
45                    android:layout_height="@dimen/screenrecord_logo_size"
46                    android:src="@drawable/ic_screenrecord"
47                    android:tint="@color/screenrecord_icon_color"/>
48                <TextView
49                    android:layout_width="wrap_content"
50                    android:layout_height="wrap_content"
51                    android:textAppearance="@style/TextAppearance.Dialog.Title"
52                    android:fontFamily="@*android:string/config_headlineFontFamily"
53                    android:text="@string/screenrecord_permission_dialog_title"
54                    android:layout_marginTop="22dp"
55                    android:layout_marginBottom="15dp"/>
56                <TextView
57                    android:layout_width="wrap_content"
58                    android:layout_height="wrap_content"
59                    android:text="@string/screenrecord_permission_dialog_warning_entire_screen"
60                    android:textAppearance="@style/TextAppearance.Dialog.Body.Message"
61                    android:gravity="center"
62                    android:layout_marginBottom="20dp"/>
63
64                <!-- Options -->
65                <LinearLayout
66                    android:layout_width="match_parent"
67                    android:layout_height="wrap_content"
68                    android:orientation="horizontal">
69                    <ImageView
70                        android:layout_width="@dimen/screenrecord_option_icon_size"
71                        android:layout_height="@dimen/screenrecord_option_icon_size"
72                        android:src="@drawable/ic_mic_26dp"
73                        android:tint="?android:attr/textColorSecondary"
74                        android:layout_gravity="center"
75                        android:layout_weight="0"
76                        android:layout_marginEnd="@dimen/screenrecord_option_padding"/>
77                    <Spinner
78                        android:id="@+id/screen_recording_options"
79                        android:layout_width="0dp"
80                        android:layout_height="wrap_content"
81                        android:minHeight="48dp"
82                        android:layout_weight="1"
83                        android:popupBackground="@drawable/screenrecord_spinner_background"
84                        android:textColor="?androidprv:attr/materialColorOnSurface"
85                        android:dropDownWidth="274dp"
86                        android:prompt="@string/screenrecord_audio_label"/>
87                    <Switch
88                        android:layout_width="wrap_content"
89                        android:minWidth="48dp"
90                        android:layout_height="48dp"
91                        android:layout_weight="0"
92                        android:layout_gravity="end"
93                        android:contentDescription="@string/screenrecord_audio_label"
94                        android:id="@+id/screenrecord_audio_switch"
95                        style="@style/ScreenRecord.Switch"/>
96                </LinearLayout>
97
98                <LinearLayout
99                    android:layout_width="match_parent"
100                    android:layout_height="wrap_content"
101                    android:orientation="horizontal"
102                    android:layout_marginTop="@dimen/screenrecord_option_padding">
103                    <ImageView
104                        android:layout_width="@dimen/screenrecord_option_icon_size"
105                        android:layout_height="@dimen/screenrecord_option_icon_size"
106                        android:layout_weight="0"
107                        android:src="@drawable/ic_touch"
108                        android:tint="?android:attr/textColorSecondary"
109                        android:layout_gravity="center"
110                        android:layout_marginEnd="@dimen/screenrecord_option_padding"/>
111                    <TextView
112                        android:layout_width="0dp"
113                        android:layout_height="wrap_content"
114                        android:minHeight="48dp"
115                        android:layout_weight="1"
116                        android:layout_gravity="fill_vertical"
117                        android:gravity="center_vertical"
118                        android:text="@string/screenrecord_taps_label"
119                        android:textAppearance="?android:attr/textAppearanceMedium"
120                        android:fontFamily="@*android:string/config_headlineFontFamily"
121                        android:textColor="?androidprv:attr/materialColorOnSurface"
122                        android:importantForAccessibility="no"/>
123                    <Switch
124                        android:layout_width="wrap_content"
125                        android:minWidth="48dp"
126                        android:layout_height="48dp"
127                        android:layout_weight="0"
128                        android:id="@+id/screenrecord_taps_switch"
129                        android:contentDescription="@string/screenrecord_taps_label"
130                        style="@style/ScreenRecord.Switch"/>
131                </LinearLayout>
132            </LinearLayout>
133
134            <!-- Buttons -->
135            <LinearLayout
136                android:layout_width="match_parent"
137                android:layout_height="wrap_content"
138                android:orientation="horizontal"
139                android:layout_marginTop="36dp">
140                <TextView
141                    android:id="@+id/button_cancel"
142                    android:layout_width="wrap_content"
143                    android:layout_height="wrap_content"
144                    android:layout_weight="0"
145                    android:layout_gravity="start"
146                    android:text="@string/cancel"
147                    style="@style/Widget.Dialog.Button.BorderButton" />
148                <Space
149                    android:layout_width="0dp"
150                    android:layout_height="match_parent"
151                    android:layout_weight="1"/>
152
153                <TextView
154                    android:id="@+id/button_start"
155                    android:layout_width="wrap_content"
156                    android:layout_height="wrap_content"
157                    android:layout_weight="0"
158                    android:layout_gravity="end"
159                    android:text="@string/screenrecord_continue"
160                    style="@style/Widget.Dialog.Button" />
161            </LinearLayout>
162        </LinearLayout>
163    </ScrollView>
164</LinearLayout>