1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2023 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<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
17    xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
18    android:theme="@android:style/Theme.DeviceDefault.DayNight"
19    android:layout_width="match_parent"
20    android:layout_height="wrap_content"
21    android:background="@drawable/immersive_cling_bg"
22    android:gravity="center_vertical"
23    android:padding="24dp">
24
25    <!-- The top margin of this icon can be adjusted to push the content down to prevent overlapping
26         with the display cutout. -->
27    <ImageView
28        android:id="@+id/immersive_cling_icon"
29        android:layout_width="32dp"
30        android:layout_height="32dp"
31        android:layout_centerHorizontal="true"
32        android:scaleType="fitXY"
33        android:src="@drawable/ic_swipe_down"
34        android:tint="?android:attr/colorAccent"
35        android:tintMode="src_in" />
36
37    <TextView
38        android:id="@+id/immersive_cling_title"
39        android:layout_width="match_parent"
40        android:layout_height="wrap_content"
41        android:layout_below="@id/immersive_cling_icon"
42        android:layout_marginTop="20dp"
43        android:gravity="center_horizontal"
44        android:text="@string/immersive_cling_title"
45        android:textColor="?androidprv:attr/materialColorOnSurface"
46        android:textSize="24sp"
47        android:fontFamily="google-sans" />
48
49    <TextView
50        android:id="@+id/immersive_cling_description"
51        android:layout_width="match_parent"
52        android:layout_height="wrap_content"
53        android:layout_below="@id/immersive_cling_title"
54        android:paddingTop="14dp"
55        android:gravity="center_horizontal"
56        android:text="@string/immersive_cling_description"
57        android:textColor="?androidprv:attr/materialColorOnSurfaceVariant"
58        android:textSize="14sp"
59        android:fontFamily="google-sans" />
60
61    <Button
62        android:id="@+id/ok"
63        style="@android:style/Widget.Material.Button.Borderless.Colored"
64        android:background="@drawable/immersive_cling_btn_bg"
65        android:layout_width="wrap_content"
66        android:layout_height="wrap_content"
67        android:layout_alignParentEnd="true"
68        android:layout_below="@+id/immersive_cling_description"
69        android:layout_marginTop="24dp"
70        android:paddingStart="18dp"
71        android:paddingEnd="18dp"
72        android:minWidth="48dp"
73        android:minHeight="48dp"
74        android:text="@string/immersive_cling_positive"
75        android:textColor="?androidprv:attr/materialColorOnPrimary"
76        android:textAllCaps="false"
77        android:textSize="14sp"
78        android:textFontWeight="500"
79        android:fontFamily="google-sans" />
80</RelativeLayout>
81