1<!--
2  Copyright (C) 2022 The Android Open Source Project
3
4  Licensed under the Apache License, Version 2.0 (the "License");
5  you may not use this file except in compliance with the License.
6  You may obtain a copy of the License at
7
8       http://www.apache.org/licenses/LICENSE-2.0
9
10  Unless required by applicable law or agreed to in writing, software
11  distributed under the License is distributed on an "AS IS" BASIS,
12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  See the License for the specific language governing permissions and
14  limitations under the License.
15  -->
16
17<!-- Scrollview is necessary to fit everything in landscape layout -->
18<ScrollView  xmlns:android="http://schemas.android.com/apk/res/android"
19    xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
20    android:id="@+id/screen_share_permission_dialog"
21    android:layout_width="match_parent"
22    android:layout_height="match_parent">
23
24    <LinearLayout
25        android:layout_width="match_parent"
26        android:layout_height="wrap_content"
27        android:paddingStart="@dimen/dialog_side_padding"
28        android:paddingEnd="@dimen/dialog_side_padding"
29        android:paddingTop="@dimen/dialog_top_padding"
30        android:paddingBottom="@dimen/dialog_bottom_padding"
31        android:orientation="vertical"
32        android:gravity="center_horizontal">
33
34        <ImageView
35            android:id="@+id/screen_share_dialog_icon"
36            android:layout_width="@dimen/screenrecord_logo_size"
37            android:layout_height="@dimen/screenrecord_logo_size"
38            android:src="@drawable/ic_media_projection_permission"
39            android:tint="?androidprv:attr/materialColorPrimary"
40            android:importantForAccessibility="no"/>
41        <TextView
42            android:id="@+id/screen_share_dialog_title"
43            android:layout_width="wrap_content"
44            android:layout_height="wrap_content"
45            android:textAppearance="@style/TextAppearance.Dialog.Title"
46            android:layout_marginTop="@dimen/screenrecord_title_margin_top"
47            android:gravity="center"/>
48        <Spinner
49            android:id="@+id/screen_share_mode_spinner"
50            android:layout_width="match_parent"
51            android:layout_height="@dimen/screenrecord_spinner_height"
52            android:layout_marginTop="@dimen/screenrecord_spinner_margin"
53            android:layout_marginBottom="@dimen/screenrecord_spinner_margin"
54            android:gravity="center_vertical"
55            android:background="@drawable/screenshare_options_spinner_background"
56            android:popupBackground="@drawable/screenrecord_options_spinner_popup_background"/>
57        <ViewStub
58            android:id="@+id/options_stub"
59            android:layout_width="match_parent"
60            android:layout_height="wrap_content"/>
61        <TextView
62            android:id="@+id/text_warning"
63            android:layout_width="match_parent"
64            android:layout_height="wrap_content"
65            android:text="@string/screenrecord_permission_dialog_warning_entire_screen"
66            style="@style/TextAppearance.Dialog.Body.Message"
67            android:gravity="start"/>
68
69        <!-- Buttons -->
70        <com.android.internal.widget.ButtonBarLayout
71            android:layout_width="match_parent"
72            android:layout_height="wrap_content"
73            android:orientation="horizontal"
74            android:layout_marginTop="@dimen/screenrecord_buttons_margin_top">
75            <Button
76                android:id="@android:id/button2"
77                android:layout_width="wrap_content"
78                android:layout_height="wrap_content"
79                android:layout_weight="0"
80                android:text="@string/cancel"
81                style="@style/Widget.Dialog.Button.BorderButton" />
82            <Space
83                android:layout_width="0dp"
84                android:layout_height="match_parent"
85                android:layout_weight="1"/>
86            <Button
87                android:id="@android:id/button1"
88                android:layout_width="wrap_content"
89                android:layout_height="wrap_content"
90                android:layout_weight="0"
91                android:text="@string/screenrecord_continue"
92                style="@style/Widget.Dialog.Button" />
93        </com.android.internal.widget.ButtonBarLayout>
94    </LinearLayout>
95</ScrollView>