xref: /aosp_15_r20/frameworks/base/packages/SystemUI/res/layout/screen_share_dialog.xml (revision d57664e9bc4670b3ecf6748a746a57c557b6bc9e)
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_options"
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            android:textAlignment="gravity"/>
69
70        <!-- Buttons -->
71        <com.android.internal.widget.ButtonBarLayout
72            android:layout_width="match_parent"
73            android:layout_height="wrap_content"
74            android:orientation="horizontal"
75            android:layout_marginTop="@dimen/screenrecord_buttons_margin_top"
76            android:gravity="end">
77            <Button
78                android:id="@android:id/button2"
79                android:layout_width="wrap_content"
80                android:layout_height="wrap_content"
81                android:text="@string/cancel"
82                style="@style/Widget.Dialog.Button.BorderButton" />
83            <Button
84                android:id="@android:id/button1"
85                android:layout_width="wrap_content"
86                android:layout_height="wrap_content"
87                android:layout_marginStart="@dimen/dialog_button_side_margin"
88                android:text="@string/screenrecord_continue"
89                style="@style/Widget.Dialog.Button" />
90        </com.android.internal.widget.ButtonBarLayout>
91    </LinearLayout>
92</ScrollView>