1<?xml version="1.0" encoding="utf-8"?>
2<!--
3  ~ Copyright (C) 2023 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
18<RelativeLayout
19        android:id="@+id/ps_header_layout"
20        xmlns:android="http://schemas.android.com/apk/res/android"
21        xmlns:app="http://schemas.android.com/apk/res-auto"
22        android:layout_width="match_parent"
23        android:layout_height="@dimen/ps_header_height"
24        android:background="@drawable/bg_ps_header"
25        android:clipToOutline="true"
26        android:gravity="center_vertical"
27        android:textDirection="locale"
28        android:orientation="horizontal"
29        android:contentDescription="@string/ps_container_lock_button_content_description"
30        android:importantForAccessibility="yes">
31
32    <LinearLayout
33        android:id="@+id/settingsAndLockGroup"
34        android:layout_width="wrap_content"
35        android:layout_height="wrap_content"
36        android:layout_centerVertical="true"
37        android:gravity="center_vertical"
38        android:layout_alignParentEnd="true"
39        android:animateLayoutChanges="false">
40        <com.android.launcher3.allapps.PrivateSpaceSettingsButton
41            android:id="@+id/ps_settings_button"
42            android:layout_width="@dimen/ps_header_image_height"
43            android:layout_height="@dimen/ps_header_image_height"
44            android:background="@drawable/ps_settings_background"
45            android:src="@drawable/ic_ps_settings"
46            android:contentDescription="@string/ps_container_settings" />
47        <LinearLayout
48            android:id="@+id/ps_lock_unlock_button"
49            android:layout_width="wrap_content"
50            android:layout_height="@dimen/ps_header_image_height"
51            android:background="@drawable/ps_lock_background"
52            android:gravity="center_vertical"
53            android:layout_marginEnd="@dimen/ps_lock_button_margin_end"
54            android:contentDescription="@string/ps_container_lock_button_content_description">
55            <ImageView
56                android:id="@+id/lock_icon"
57                android:layout_width="@dimen/ps_lock_icon_size"
58                android:layout_height="@dimen/ps_lock_icon_size"
59                android:layout_marginTop="@dimen/ps_lock_icon_margin_top"
60                android:layout_marginBottom="@dimen/ps_lock_icon_margin_bottom"
61                android:importantForAccessibility="no"
62                android:src="@drawable/ic_lock"
63                app:tint="@color/material_color_primary_fixed_dim"
64                android:scaleType="center"/>
65            <TextView
66                android:id="@+id/lock_text"
67                android:layout_width="wrap_content"
68                android:layout_height="wrap_content"
69                android:layout_marginStart="@dimen/ps_lock_icon_text_margin_start_expanded"
70                android:layout_marginEnd="@dimen/ps_lock_icon_text_margin_end_expanded"
71                android:textColor="@color/material_color_on_primary_fixed"
72                android:textSize="14sp"
73                android:text="@string/ps_container_lock_title"
74                android:visibility="gone"
75                style="@style/TextHeadline"/>
76        </LinearLayout>
77    </LinearLayout>
78    <ImageView
79        android:id="@+id/ps_transition_image"
80        android:layout_width="wrap_content"
81        android:layout_height="@dimen/ps_header_image_height"
82        android:layout_alignParentEnd="true"
83        android:layout_centerVertical="true"
84        android:background="@android:color/transparent"
85        android:layout_marginEnd="@dimen/ps_header_layout_margin"
86        android:src="@drawable/bg_ps_transition_image"
87        android:contentDescription="@string/ps_container_transition" />
88
89    <TextView
90        android:id="@+id/ps_container_header"
91        android:layout_width="wrap_content"
92        android:layout_height="wrap_content"
93        android:minHeight="@dimen/ps_header_text_height"
94        android:layout_alignParentStart="true"
95        android:layout_centerVertical="true"
96        android:layout_toStartOf="@+id/settingsAndLockGroup"
97        android:gravity="center_vertical"
98        android:layout_marginStart="@dimen/ps_header_layout_margin"
99        android:text="@string/ps_container_title"
100        android:theme="@style/PrivateSpaceHeaderTextStyle"
101        android:importantForAccessibility="no"/>
102
103</RelativeLayout>