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:visibility="gone" 47 android:contentDescription="@string/ps_container_settings" /> 48 <LinearLayout 49 android:id="@+id/ps_lock_unlock_button" 50 android:layout_width="wrap_content" 51 android:layout_height="@dimen/ps_header_image_height" 52 android:background="@drawable/ps_lock_background" 53 android:gravity="center_vertical" 54 android:layout_marginEnd="@dimen/ps_lock_button_margin_end" 55 android:contentDescription="@string/ps_container_lock_button_content_description"> 56 <ImageView 57 android:id="@+id/lock_icon" 58 android:layout_width="@dimen/ps_lock_icon_size" 59 android:layout_height="@dimen/ps_lock_icon_size" 60 android:layout_marginTop="@dimen/ps_lock_icon_margin_top" 61 android:layout_marginBottom="@dimen/ps_lock_icon_margin_bottom" 62 android:importantForAccessibility="no" 63 android:src="@drawable/ic_lock" 64 app:tint="@color/materialColorPrimaryFixedDim" 65 android:scaleType="center"/> 66 <TextView 67 android:id="@+id/lock_text" 68 android:layout_width="wrap_content" 69 android:layout_height="wrap_content" 70 android:layout_marginStart="@dimen/ps_lock_icon_text_margin_start_expanded" 71 android:layout_marginEnd="@dimen/ps_lock_icon_text_margin_end_expanded" 72 android:textColor="@color/materialColorOnPrimaryFixed" 73 android:textSize="14sp" 74 android:text="@string/ps_container_lock_title" 75 android:maxLines="1" 76 android:visibility="gone" 77 android:alpha="0" 78 style="@style/TextHeadline"/> 79 </LinearLayout> 80 </LinearLayout> 81 <ImageView 82 android:id="@+id/ps_transition_image" 83 android:layout_width="wrap_content" 84 android:layout_height="@dimen/ps_header_image_height" 85 android:layout_alignParentEnd="true" 86 android:layout_centerVertical="true" 87 android:background="@android:color/transparent" 88 android:layout_marginEnd="@dimen/ps_header_layout_margin" 89 android:src="@drawable/bg_ps_transition_image" 90 android:contentDescription="@string/ps_container_transition" /> 91 92 <TextView 93 android:id="@+id/ps_container_header" 94 android:layout_width="wrap_content" 95 android:layout_height="wrap_content" 96 android:minHeight="@dimen/ps_header_text_height" 97 android:layout_alignParentStart="true" 98 android:layout_centerVertical="true" 99 android:layout_toStartOf="@+id/settingsAndLockGroup" 100 android:gravity="center_vertical" 101 android:layout_marginStart="@dimen/ps_header_layout_margin" 102 android:text="@string/ps_container_title" 103 android:maxLines="1" 104 android:theme="@style/PrivateSpaceHeaderTextStyle" 105 android:importantForAccessibility="no"/> 106 107</RelativeLayout>